projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea0ec5b
)
style cleanup
author
Art Cancro
<ajc@citadel.org>
Sat, 4 Mar 2017 22:13:55 +0000
(17:13 -0500)
committer
Art Cancro
<ajc@citadel.org>
Sat, 4 Mar 2017 22:13:55 +0000
(17:13 -0500)
15 files changed:
citadel/modules/extnotify/extnotify_main.c
patch
|
blob
|
history
citadel/modules/imap/imap_acl.c
patch
|
blob
|
history
citadel/modules/imap/imap_acl.h
patch
|
blob
|
history
citadel/modules/imap/imap_fetch.c
patch
|
blob
|
history
citadel/modules/imap/imap_fetch.h
patch
|
blob
|
history
citadel/modules/imap/imap_list.c
patch
|
blob
|
history
citadel/modules/imap/imap_metadata.c
patch
|
blob
|
history
citadel/modules/imap/imap_metadata.h
patch
|
blob
|
history
citadel/modules/imap/imap_misc.c
patch
|
blob
|
history
citadel/modules/imap/imap_misc.h
patch
|
blob
|
history
citadel/modules/imap/imap_search.h
patch
|
blob
|
history
citadel/modules/imap/imap_store.h
patch
|
blob
|
history
citadel/modules/imap/imap_tools.c
patch
|
blob
|
history
citadel/modules/imap/serv_imap.c
patch
|
blob
|
history
citadel/modules/imap/serv_imap.h
patch
|
blob
|
history
diff --git
a/citadel/modules/extnotify/extnotify_main.c
b/citadel/modules/extnotify/extnotify_main.c
index 097c9fef8f35a47f5879d0c33eadc191d34455f8..7bbad0503b9eee9830c092c7bba334085b451a6d 100644
(file)
--- a/
citadel/modules/extnotify/extnotify_main.c
+++ b/
citadel/modules/extnotify/extnotify_main.c
@@
-174,7
+174,7
@@
eNotifyType extNotify_getConfigMessage(char *username,
num_msgs = cdbfr->len / sizeof(long);
cdb_free(cdbfr);
} else {
num_msgs = cdbfr->len / sizeof(long);
cdb_free(cdbfr);
} else {
-
MARKM_
syslog(LOG_DEBUG,
+ syslog(LOG_DEBUG,
"extNotify_getConfigMessage: "
"No config messages found");
return eNone; /* No messages at all? No further action. */
"extNotify_getConfigMessage: "
"No config messages found");
return eNone; /* No messages at all? No further action. */
@@
-392,7
+392,7
@@
void do_extnotify_queue(void)
if (IsEmptyStr(CtdlGetConfigStr("c_pager_program")) &&
IsEmptyStr(CtdlGetConfigStr("c_funambol_host")))
{
if (IsEmptyStr(CtdlGetConfigStr("c_pager_program")) &&
IsEmptyStr(CtdlGetConfigStr("c_funambol_host")))
{
-
MARKM_
syslog(LOG_DEBUG,
+ syslog(LOG_DEBUG,
"No external notifiers configured on system/user");
return;
}
"No external notifiers configured on system/user");
return;
}
@@
-409,7
+409,7
@@
void do_extnotify_queue(void)
/*
* Go ahead and run the queue
*/
/*
* Go ahead and run the queue
*/
-
MARKM_
syslog(LOG_DEBUG, "serv_extnotify: processing notify queue");
+ syslog(LOG_DEBUG, "serv_extnotify: processing notify queue");
memset(&Ctx, 0, sizeof(NotifyContext));
if ((GetNotifyHosts(&Ctx) > 0) &&
memset(&Ctx, 0, sizeof(NotifyContext));
if ((GetNotifyHosts(&Ctx) > 0) &&
@@
-426,7
+426,7
@@
void do_extnotify_queue(void)
}
CtdlForEachMessage(MSGS_ALL, 0L, NULL,
SPOOLMIME, NULL, process_notify, &Ctx);
}
CtdlForEachMessage(MSGS_ALL, 0L, NULL,
SPOOLMIME, NULL, process_notify, &Ctx);
-
MARKM_
syslog(LOG_DEBUG, "serv_extnotify: queue run completed");
+ syslog(LOG_DEBUG, "serv_extnotify: queue run completed");
doing_queue = 0;
if (Ctx.nNotifyHosts > 0)
{
doing_queue = 0;
if (Ctx.nNotifyHosts > 0)
{
diff --git
a/citadel/modules/imap/imap_acl.c
b/citadel/modules/imap/imap_acl.c
index 207a32817c1bce11f7cd6dd96dc436ac455ad9bb..450d5ebf218864a0abd64a1c2d97edb052134621 100644
(file)
--- a/
citadel/modules/imap/imap_acl.c
+++ b/
citadel/modules/imap/imap_acl.c
@@
-1,8
+1,7
@@
/*
* Functions which implement RFC2086 (and maybe RFC4314) (IMAP ACL extension)
*
/*
* Functions which implement RFC2086 (and maybe RFC4314) (IMAP ACL extension)
*
- *
- * Copyright (c) 2007-2011 by the citadel.org team
+ * Copyright (c) 2007-2017 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git
a/citadel/modules/imap/imap_acl.h
b/citadel/modules/imap/imap_acl.h
index 61b04f13a58bb616a999911e01d75bcc99013bc6..a3b260513b05a445a1659b2ddd275e551aad08de 100644
(file)
--- a/
citadel/modules/imap/imap_acl.h
+++ b/
citadel/modules/imap/imap_acl.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2007-201
2
by the citadel.org team
+ * Copyright (c) 2007-201
7
by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
- *
- *
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- *
- *
- *
*/
void imap_setacl(int num_parms, ConstStr *Params);
*/
void imap_setacl(int num_parms, ConstStr *Params);
diff --git
a/citadel/modules/imap/imap_fetch.c
b/citadel/modules/imap/imap_fetch.c
index 8fcd6bd813ab6c2bc3055f65cde7dbb176e4d288..2939f43d5cbfa73f2fdad6cf7e61c8dfb40c3593 100644
(file)
--- a/
citadel/modules/imap/imap_fetch.c
+++ b/
citadel/modules/imap/imap_fetch.c
@@
-2,7
+2,7
@@
* Implements the FETCH command in IMAP.
* This is a good example of the protocol's gratuitous complexity.
*
* Implements the FETCH command in IMAP.
* This is a good example of the protocol's gratuitous complexity.
*
- * Copyright (c) 2001-201
5
by the citadel.org team
+ * Copyright (c) 2001-201
7
by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-234,7
+234,7
@@
void imap_fetch_rfc822(long msgnum, const char *whichfmt) {
text_size = 0;
}
text_size = 0;
}
-
IMAP_
syslog(LOG_DEBUG,
+ syslog(LOG_DEBUG,
"RFC822: headers=" SIZE_T_FMT
", text=" SIZE_T_FMT
", total=" SIZE_T_FMT,
"RFC822: headers=" SIZE_T_FMT
", text=" SIZE_T_FMT
", total=" SIZE_T_FMT,
@@
-278,12
+278,11
@@
void imap_load_part(char *name, char *filename, char *partnum, char *disp,
void *content, char *cbtype, char *cbcharset, size_t length, char *encoding,
char *cbid, void *cbuserdata)
{
void *content, char *cbtype, char *cbcharset, size_t length, char *encoding,
char *cbid, void *cbuserdata)
{
- struct CitContext *CCC = CC;
char mimebuf2[SIZ];
StrBuf *desired_section;
desired_section = (StrBuf *)cbuserdata;
char mimebuf2[SIZ];
StrBuf *desired_section;
desired_section = (StrBuf *)cbuserdata;
-
IMAP_
syslog(LOG_DEBUG, "imap_load_part() looking for %s, found %s",
+ syslog(LOG_DEBUG, "imap_load_part() looking for %s, found %s",
ChrPtr(desired_section),
partnum
);
ChrPtr(desired_section),
partnum
);
@@
-666,9
+665,7
@@
void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
if (strchr(ChrPtr(section), '[') != NULL) {
StrBufStripAllBut(section, '[', ']');
}
if (strchr(ChrPtr(section), '[') != NULL) {
StrBufStripAllBut(section, '[', ']');
}
- IMAP_syslog(LOG_DEBUG, "Section is: [%s]",
- (StrLength(section) == 0) ? "(empty)" : ChrPtr(section)
- );
+ syslog(LOG_DEBUG, "Section is: [%s]", (StrLength(section) == 0) ? "(empty)" : ChrPtr(section));
/* Burn the cache if we don't have the same section of the
* same message again.
/* Burn the cache if we don't have the same section of the
* same message again.
@@
-700,7
+697,7
@@
void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
is_partial = 1;
}
if ( (is_partial == 1) && (StrLength(partial) > 0) ) {
is_partial = 1;
}
if ( (is_partial == 1) && (StrLength(partial) > 0) ) {
-
IMAP_
syslog(LOG_DEBUG, "Partial is <%s>", ChrPtr(partial));
+ syslog(LOG_DEBUG, "Partial is <%s>", ChrPtr(partial));
}
if (Imap->cached_body == NULL) {
}
if (Imap->cached_body == NULL) {
@@
-1125,16
+1122,16
@@
void imap_do_fetch(citimap_command *Cmd) {
/* debug output the parsed vector */
{
int i;
/* debug output the parsed vector */
{
int i;
-
IMAP_
syslog(LOG_DEBUG, "----- %ld params", Cmd->num_parms);
+ syslog(LOG_DEBUG, "----- %ld params", Cmd->num_parms);
for (i=0; i < Cmd->num_parms; i++) {
if (Cmd->Params[i].len != strlen(Cmd->Params[i].Key))
for (i=0; i < Cmd->num_parms; i++) {
if (Cmd->Params[i].len != strlen(Cmd->Params[i].Key))
-
IMAP_
syslog(LOG_DEBUG, "*********** %ld != %ld : %s",
+ syslog(LOG_DEBUG, "*********** %ld != %ld : %s",
Cmd->Params[i].len,
strlen(Cmd->Params[i].Key),
Cmd->Params[i].Key);
else
Cmd->Params[i].len,
strlen(Cmd->Params[i].Key),
Cmd->Params[i].Key);
else
-
IMAP_
syslog(LOG_DEBUG, "%ld : %s",
+ syslog(LOG_DEBUG, "%ld : %s",
Cmd->Params[i].len,
Cmd->Params[i].Key);
}}
Cmd->Params[i].len,
Cmd->Params[i].Key);
}}
@@
-1457,7
+1454,7
@@
void imap_uidfetch(int num_parms, ConstStr *Params) {
MakeStringOf(Cmd.CmdBuf, 4);
#if 0
MakeStringOf(Cmd.CmdBuf, 4);
#if 0
-
IMAP_
syslog(LOG_DEBUG, "-------%s--------", ChrPtr(Cmd.CmdBuf));
+ syslog(LOG_DEBUG, "-------%s--------", ChrPtr(Cmd.CmdBuf));
#endif
num_items = imap_extract_data_items(&Cmd);
if (num_items < 1) {
#endif
num_items = imap_extract_data_items(&Cmd);
if (num_items < 1) {
diff --git
a/citadel/modules/imap/imap_fetch.h
b/citadel/modules/imap/imap_fetch.h
index 261e1599525c68a9f4e915d1b7b208f4a15f29b7..7847fce534c1f55d7407776a6b6bac519bfe0741 100644
(file)
--- a/
citadel/modules/imap/imap_fetch.h
+++ b/
citadel/modules/imap/imap_fetch.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2001-201
2
by the citadel.org team
+ * Copyright (c) 2001-201
7
by the citadel.org team
*
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
*
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void imap_pick_range(const char *range, int is_uid);
*/
void imap_pick_range(const char *range, int is_uid);
diff --git
a/citadel/modules/imap/imap_list.c
b/citadel/modules/imap/imap_list.c
index 14cd0476ecee1f613b20fe537bf9a7e08e4c258e..4cf1ff5c8179eff91bac68ba72397bee9bf22967 100644
(file)
--- a/
citadel/modules/imap/imap_list.c
+++ b/
citadel/modules/imap/imap_list.c
@@
-1,7
+1,7
@@
/*
* Implements the LIST and LSUB commands.
*
/*
* Implements the LIST and LSUB commands.
*
- * Copyright (c) 2000-20
09
by Art Cancro and others.
+ * Copyright (c) 2000-20
17
by Art Cancro and others.
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-378,7
+378,7
@@
void imap_list(int num_parms, ConstStr *Params)
&Params[i],
1);
&Params[i],
1);
-
IMAP_
syslog(LOG_DEBUG, "evaluating <%s>", Params[i].Key);
+ syslog(LOG_DEBUG, "evaluating <%s>", Params[i].Key);
if (!strcasecmp(Params[i].Key, "SUBSCRIBED")) {
ImapFilter.return_subscribed = 1;
if (!strcasecmp(Params[i].Key, "SUBSCRIBED")) {
ImapFilter.return_subscribed = 1;
diff --git
a/citadel/modules/imap/imap_metadata.c
b/citadel/modules/imap/imap_metadata.c
index e9ea55ee9acdc3dcbf4222045cca47562c8f2e69..4b3d1681cc65e6b565b583c31b8f3f23f4b931dc 100644
(file)
--- a/
citadel/modules/imap/imap_metadata.c
+++ b/
citadel/modules/imap/imap_metadata.c
@@
-3,21
+3,21
@@
*
* This is an implementation of the Bynari variant of the METADATA extension.
*
*
* This is an implementation of the Bynari variant of the METADATA extension.
*
- * Copyright (c) 2007-20
09
by the citadel.org team
+ * Copyright (c) 2007-20
17
by the citadel.org team
*
*
- *
This program is open source software; you can redistribute it and/or modify
- *
it under the terms of the GNU General Public License as published by
- *
the Free Software Foundation; either version 3 of the License, or
- *
(at your option) any later version.
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
*
- *
This program is distributed in the hope that it will be useful,
- *
but WITHOUT ANY WARRANTY; without even the implied warranty of
- *
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- *
GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
*
- *
You should have received a copy of the GNU General Public License
- *
along with this program; if not, write to the Free Software
- *
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
diff --git
a/citadel/modules/imap/imap_metadata.h
b/citadel/modules/imap/imap_metadata.h
index b45d22a8641da923efda5d0a813fc94fee63375e..3f2a8bcbde6b64d1313a44ae06dde63fa657176b 100644
(file)
--- a/
citadel/modules/imap/imap_metadata.h
+++ b/
citadel/modules/imap/imap_metadata.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2007-201
2
by the citadel.org team
+ * Copyright (c) 2007-201
7
by the citadel.org team
*
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
*
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void imap_getmetadata(int num_parms, ConstStr *Params);
*/
void imap_getmetadata(int num_parms, ConstStr *Params);
diff --git
a/citadel/modules/imap/imap_misc.c
b/citadel/modules/imap/imap_misc.c
index 3665264554ddc574840d88acef5e64017c857a31..b966f87b4cc16f8affeb07a8a6ef52aec7f415db 100644
(file)
--- a/
citadel/modules/imap/imap_misc.c
+++ b/
citadel/modules/imap/imap_misc.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 1987-201
5
by the citadel.org team
+ * Copyright (c) 1987-201
7
by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-351,10
+351,10
@@
void imap_append(int num_parms, ConstStr *Params) {
client_getln(dummy, sizeof dummy);
/* Convert RFC822 newlines (CRLF) to Unix newlines (LF) */
client_getln(dummy, sizeof dummy);
/* Convert RFC822 newlines (CRLF) to Unix newlines (LF) */
-
IMAPM_
syslog(LOG_DEBUG, "Converting CRLF to LF");
+ syslog(LOG_DEBUG, "Converting CRLF to LF");
StrBufToUnixLF(Imap->TransmittedMessage);
StrBufToUnixLF(Imap->TransmittedMessage);
-
IMAPM_
syslog(LOG_DEBUG, "Converting message format");
+ syslog(LOG_DEBUG, "Converting message format");
msg = convert_internet_message_buf(&Imap->TransmittedMessage);
ret = imap_grabroom(roomname, Params[2].Key, 1);
msg = convert_internet_message_buf(&Imap->TransmittedMessage);
ret = imap_grabroom(roomname, Params[2].Key, 1);
diff --git
a/citadel/modules/imap/imap_misc.h
b/citadel/modules/imap/imap_misc.h
index 1866bf9ffb3c35213f2b6e8262c0c04c924b3d89..d0dfa40b9b392bc20fcf19df1399685161f4ffac 100644
(file)
--- a/
citadel/modules/imap/imap_misc.h
+++ b/
citadel/modules/imap/imap_misc.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2001-201
2
by the citadel.org team
+ * Copyright (c) 2001-201
7
by the citadel.org team
*
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
*
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void imap_copy(int num_parms, ConstStr *Params);
*/
void imap_copy(int num_parms, ConstStr *Params);
diff --git
a/citadel/modules/imap/imap_search.h
b/citadel/modules/imap/imap_search.h
index cfb1b9b58e5b50de7de374210b09d84c1bb77a38..ce2f27cea888eee77dd3cedd92cc058ead368f08 100644
(file)
--- a/
citadel/modules/imap/imap_search.h
+++ b/
citadel/modules/imap/imap_search.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2001-201
2
by the citadel.org team
+ * Copyright (c) 2001-201
7
by the citadel.org team
*
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
*
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void imap_search(int num_parms, ConstStr *Params);
*/
void imap_search(int num_parms, ConstStr *Params);
diff --git
a/citadel/modules/imap/imap_store.h
b/citadel/modules/imap/imap_store.h
index 26d270f00796aa4f820a50769f957485a12185b8..cf47377aaf4c04016e0afe552f669b428a21de10 100644
(file)
--- a/
citadel/modules/imap/imap_store.h
+++ b/
citadel/modules/imap/imap_store.h
@@
-1,19
+1,13
@@
/*
/*
- * Copyright (c) 2001-201
2
by the citadel.org team
+ * Copyright (c) 2001-201
7
by the citadel.org team
*
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
*
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
void imap_store(int num_parms, ConstStr *Params);
*/
void imap_store(int num_parms, ConstStr *Params);
diff --git
a/citadel/modules/imap/imap_tools.c
b/citadel/modules/imap/imap_tools.c
index f3ccee05c01ca71506fa670fa154cd169ce7188e..f6839c9e81e23e2d6c2a24c5d3d8bbc787f0d217 100644
(file)
--- a/
citadel/modules/imap/imap_tools.c
+++ b/
citadel/modules/imap/imap_tools.c
@@
-1,7
+1,7
@@
/*
* Utility functions for the IMAP module.
*
/*
* Utility functions for the IMAP module.
*
- * Copyright (c) 2001-20
09
by the citadel.org team and others, except for
+ * Copyright (c) 2001-20
17
by the citadel.org team and others, except for
* most of the UTF7 and UTF8 handling code which was lifted from Evolution.
*
* This program is open source software; you can redistribute it and/or modify
* most of the UTF7 and UTF8 handling code which was lifted from Evolution.
*
* This program is open source software; you can redistribute it and/or modify
@@
-221,7
+221,7
@@
static char* toimap(char* destp, char* destend, char* src)
*destp = 0;
string_init(&dest, destp, destend-destp);
*destp = 0;
string_init(&dest, destp, destend-destp);
- /*
IMAP_
syslog(LOG_DEBUG, "toimap %s", src); */
+ /* syslog(LOG_DEBUG, "toimap %s", src); */
for (;;)
{
for (;;)
{
@@
-287,7
+287,7
@@
static char* toimap(char* destp, char* destend, char* src)
if (state == 1)
utf7_closeb64(&dest, v, i);
if (state == 1)
utf7_closeb64(&dest, v, i);
- /*
IMAP_
syslog(LOG_DEBUG, " -> %s", destp); */
+ /* syslog(LOG_DEBUG, " -> %s", destp); */
return string_end(&dest);
}
return string_end(&dest);
}
@@
-305,7
+305,7
@@
static char* fromimap(char* destp, char* destend, const char* src)
*destp = 0;
string_init(&dest, destp, destend-destp);
*destp = 0;
string_init(&dest, destp, destend-destp);
- /*
IMAP_
syslog(LOG_DEBUG, "fromimap %s", src); */
+ /* syslog(LOG_DEBUG, "fromimap %s", src); */
do {
c = *p++;
do {
c = *p++;
@@
-363,7
+363,7
@@
static char* fromimap(char* destp, char* destend, const char* src)
}
} while (c != '\0');
}
} while (c != '\0');
- /*
IMAP_
syslog(LOG_DEBUG, " -> %s", destp); */
+ /* syslog(LOG_DEBUG, " -> %s", destp); */
return string_end(&dest);
}
return string_end(&dest);
}
@@
-606,7
+606,6
@@
long imap_mailboxname(char *buf, int bufsize, struct ctdlroom *qrbuf)
int imap_roomname(char *rbuf, int bufsize, const char *foldername)
{
int imap_roomname(char *rbuf, int bufsize, const char *foldername)
{
- struct CitContext *CCC = CC;
int levels;
char floorname[ROOMNAMELEN*2];
char roomname[ROOMNAMELEN];
int levels;
char floorname[ROOMNAMELEN*2];
char roomname[ROOMNAMELEN];
@@
-683,7
+682,7
@@
int imap_roomname(char *rbuf, int bufsize, const char *foldername)
ret = (0 | IR_MAILBOX);
exit:
ret = (0 | IR_MAILBOX);
exit:
-
IMAP_
syslog(LOG_DEBUG, "(That translates to \"%s\")", rbuf);
+ syslog(LOG_DEBUG, "(That translates to \"%s\")", rbuf);
return(ret);
}
return(ret);
}
diff --git
a/citadel/modules/imap/serv_imap.c
b/citadel/modules/imap/serv_imap.c
index 60584df2750235c6f611586b144e94a09751e4ba..33a3f3ba7a34c26142b828116253b9d484d19564 100644
(file)
--- a/
citadel/modules/imap/serv_imap.c
+++ b/
citadel/modules/imap/serv_imap.c
@@
-1,7
+1,7
@@
/*
* IMAP server for the Citadel system
*
/*
* IMAP server for the Citadel system
*
- * Copyright (C) 2000-201
5
by Art Cancro and others.
+ * Copyright (C) 2000-201
7
by Art Cancro and others.
* This code is released under the terms of the GNU General Public License.
*
* WARNING: the IMAP protocol is badly designed. No implementation of it
* This code is released under the terms of the GNU General Public License.
*
* WARNING: the IMAP protocol is badly designed. No implementation of it
@@
-65,7
+65,6
@@
#include "imap_misc.h"
#include "ctdl_module.h"
#include "imap_misc.h"
#include "ctdl_module.h"
-int IMAPDebugEnabled = 0;
HashList *ImapCmds = NULL;
void registerImapCMD(const char *First, long FLen,
const char *Second, long SLen,
HashList *ImapCmds = NULL;
void registerImapCMD(const char *First, long FLen,
const char *Second, long SLen,
@@
-109,33
+108,31
@@
const imap_handler_hook *imap_lookup(int num_parms, ConstStr *Params)
StrBufPlain(Imap->Reply, CKEY(Params[1]));
StrBufUpCase(Imap->Reply);
StrBufPlain(Imap->Reply, CKEY(Params[1]));
StrBufUpCase(Imap->Reply);
- IMAP_syslog(LOG_DEBUG, "---- Looking up [%s] -----",
- ChrPtr(Imap->Reply));
+ syslog(LOG_DEBUG, "---- Looking up [%s] -----", ChrPtr(Imap->Reply));
if (GetHash(ImapCmds, SKEY(Imap->Reply), &v))
{
if (GetHash(ImapCmds, SKEY(Imap->Reply), &v))
{
-
IMAPM_
syslog(LOG_DEBUG, "Found.");
+ syslog(LOG_DEBUG, "Found.");
FlushStrBuf(Imap->Reply);
return (imap_handler_hook *) v;
}
if (num_parms == 1)
{
FlushStrBuf(Imap->Reply);
return (imap_handler_hook *) v;
}
if (num_parms == 1)
{
-
IMAPM_
syslog(LOG_DEBUG, "NOT Found.");
+ syslog(LOG_DEBUG, "NOT Found.");
FlushStrBuf(Imap->Reply);
return NULL;
}
FlushStrBuf(Imap->Reply);
return NULL;
}
- IMAP_syslog(LOG_DEBUG, "---- Looking up [%s] -----",
- ChrPtr(Imap->Reply));
+ syslog(LOG_DEBUG, "---- Looking up [%s] -----", ChrPtr(Imap->Reply));
StrBufAppendBufPlain(Imap->Reply, CKEY(Params[2]), 0);
StrBufUpCase(Imap->Reply);
if (GetHash(ImapCmds, SKEY(Imap->Reply), &v))
{
StrBufAppendBufPlain(Imap->Reply, CKEY(Params[2]), 0);
StrBufUpCase(Imap->Reply);
if (GetHash(ImapCmds, SKEY(Imap->Reply), &v))
{
-
IMAPM_
syslog(LOG_DEBUG, "Found.");
+ syslog(LOG_DEBUG, "Found.");
FlushStrBuf(Imap->Reply);
return (imap_handler_hook *) v;
}
FlushStrBuf(Imap->Reply);
return (imap_handler_hook *) v;
}
-
IMAPM_
syslog(LOG_DEBUG, "NOT Found.");
+ syslog(LOG_DEBUG, "NOT Found.");
FlushStrBuf(Imap->Reply);
return NULL;
}
FlushStrBuf(Imap->Reply);
return NULL;
}
@@
-307,7
+304,7
@@
void imap_load_msgids(void)
citimap *Imap = CCCIMAP;
if (Imap->selected == 0) {
citimap *Imap = CCCIMAP;
if (Imap->selected == 0) {
-
IMAPM_
syslog(LOG_ERR, "imap_load_msgids() can't run; no room selected");
+ syslog(LOG_ERR, "imap_load_msgids() can't run; no room selected");
return;
}
return;
}
@@
-350,7
+347,7
@@
void imap_rescan_msgids(void)
int num_recent = 0;
if (Imap->selected == 0) {
int num_recent = 0;
if (Imap->selected == 0) {
-
IMAPM_
syslog(LOG_ERR, "imap_load_msgids() can't run; no room selected");
+ syslog(LOG_ERR, "imap_load_msgids() can't run; no room selected");
return;
}
return;
}
@@
-482,7
+479,7
@@
void imap_cleanup_function(void)
imap_do_expunge();
}
imap_do_expunge();
}
-
IMAPM_
syslog(LOG_DEBUG, "Performing IMAP cleanup hook");
+ syslog(LOG_DEBUG, "Performing IMAP cleanup hook");
imap_free_msgids();
imap_free_transmitted_message();
imap_free_msgids();
imap_free_transmitted_message();
@@
-502,7
+499,7
@@
void imap_cleanup_function(void)
FreeStrBuf(&Imap->Reply);
if (Imap->Cmd.Params != NULL) free(Imap->Cmd.Params);
free(Imap);
FreeStrBuf(&Imap->Reply);
if (Imap->Cmd.Params != NULL) free(Imap->Cmd.Params);
free(Imap);
-
IMAPM_
syslog(LOG_DEBUG, "Finished IMAP cleanup hook");
+ syslog(LOG_DEBUG, "Finished IMAP cleanup hook");
}
}
@@
-945,7
+942,7
@@
int imap_do_expunge(void)
long *delmsgs = NULL;
int num_delmsgs = 0;
long *delmsgs = NULL;
int num_delmsgs = 0;
-
IMAPM_
syslog(LOG_DEBUG, "imap_do_expunge() called");
+ syslog(LOG_DEBUG, "imap_do_expunge() called");
if (Imap->selected == 0) {
return (0);
}
if (Imap->selected == 0) {
return (0);
}
@@
-968,7
+965,7
@@
int imap_do_expunge(void)
imap_rescan_msgids();
}
imap_rescan_msgids();
}
-
IMAP_
syslog(LOG_DEBUG, "Expunged %d messages from <%s>", num_expunged, CC->room.QRname);
+ syslog(LOG_DEBUG, "Expunged %d messages from <%s>", num_expunged, CC->room.QRname);
return (num_expunged);
}
return (num_expunged);
}
@@
-1049,7
+1046,6
@@
void imap_namespace(int num_parms, ConstStr *Params)
*/
void imap_create(int num_parms, ConstStr *Params)
{
*/
void imap_create(int num_parms, ConstStr *Params)
{
- struct CitContext *CCC = CC;
int ret;
char roomname[ROOMNAMELEN];
int floornum;
int ret;
char roomname[ROOMNAMELEN];
int floornum;
@@
-1065,14
+1061,14
@@
void imap_create(int num_parms, ConstStr *Params)
if (strchr(Params[2].Key, '\\') != NULL) {
IReply("NO Invalid character in folder name");
if (strchr(Params[2].Key, '\\') != NULL) {
IReply("NO Invalid character in folder name");
-
IMAPM_
syslog(LOG_ERR, "invalid character in folder name");
+ syslog(LOG_ERR, "invalid character in folder name");
return;
}
ret = imap_roomname(roomname, sizeof roomname, Params[2].Key);
if (ret < 0) {
IReply("NO Invalid mailbox name or location");
return;
}
ret = imap_roomname(roomname, sizeof roomname, Params[2].Key);
if (ret < 0) {
IReply("NO Invalid mailbox name or location");
-
IMAPM_
syslog(LOG_ERR, "invalid mailbox name or location");
+ syslog(LOG_ERR, "invalid mailbox name or location");
return;
}
floornum = (ret & 0x00ff); /* lower 8 bits = floor number */
return;
}
floornum = (ret & 0x00ff); /* lower 8 bits = floor number */
@@
-1081,7
+1077,7
@@
void imap_create(int num_parms, ConstStr *Params)
if (flags & IR_MAILBOX) {
if (strncasecmp(Params[2].Key, "INBOX/", 6)) {
IReply("NO Personal folders must be created under INBOX");
if (flags & IR_MAILBOX) {
if (strncasecmp(Params[2].Key, "INBOX/", 6)) {
IReply("NO Personal folders must be created under INBOX");
-
IMAPM_
syslog(LOG_ERR, "not subordinate to inbox");
+ syslog(LOG_ERR, "not subordinate to inbox");
return;
}
}
return;
}
}
@@
-1094,7
+1090,7
@@
void imap_create(int num_parms, ConstStr *Params)
newroomview = VIEW_BBS;
}
newroomview = VIEW_BBS;
}
-
IMAP_
syslog(LOG_INFO, "Create new room <%s> on floor <%d> with type <%d>",
+ syslog(LOG_INFO, "Create new room <%s> on floor <%d> with type <%d>",
roomname, floornum, newroomtype);
ret = CtdlCreateRoom(roomname, newroomtype, "", floornum, 1, 0, newroomview);
roomname, floornum, newroomtype);
ret = CtdlCreateRoom(roomname, newroomtype, "", floornum, 1, 0, newroomview);
@@
-1116,7
+1112,7
@@
void imap_create(int num_parms, ConstStr *Params)
CtdlAideMessage(notification_message, "Room Creation Message");
free(notification_message);
}
CtdlAideMessage(notification_message, "Room Creation Message");
free(notification_message);
}
-
IMAPM_
syslog(LOG_DEBUG, "imap_create() completed");
+ syslog(LOG_DEBUG, "imap_create() completed");
}
}
@@
-1481,9
+1477,8
@@
void imap_rename(int num_parms, ConstStr *Params)
irl->irl_newroom,
irl->irl_newfloor);
if (r != crr_ok) {
irl->irl_newroom,
irl->irl_newfloor);
if (r != crr_ok) {
- struct CitContext *CCC = CC;
/* FIXME handle error returns better */
/* FIXME handle error returns better */
-
IMAP_
syslog(LOG_ERR, "CtdlRenameRoom() error %d", r);
+ syslog(LOG_ERR, "CtdlRenameRoom() error %d", r);
}
irlp = irl;
irl = irl->next;
}
irlp = irl;
irl = irl->next;
@@
-1525,23
+1520,23
@@
void imap_command_loop(void)
FlushStrBuf(Imap->Cmd.CmdBuf);
if (CtdlClientGetLine(Imap->Cmd.CmdBuf) < 1) {
FlushStrBuf(Imap->Cmd.CmdBuf);
if (CtdlClientGetLine(Imap->Cmd.CmdBuf) < 1) {
-
IMAPM_
syslog(LOG_ERR, "client disconnected: ending session.");
+ syslog(LOG_ERR, "client disconnected: ending session.");
CC->kill_me = KILLME_CLIENT_DISCONNECTED;
return;
}
if (Imap->authstate == imap_as_expecting_password) {
CC->kill_me = KILLME_CLIENT_DISCONNECTED;
return;
}
if (Imap->authstate == imap_as_expecting_password) {
-
IMAPM_
syslog(LOG_INFO, "<password>");
+ syslog(LOG_INFO, "<password>");
}
else if (Imap->authstate == imap_as_expecting_plainauth) {
}
else if (Imap->authstate == imap_as_expecting_plainauth) {
-
IMAPM_
syslog(LOG_INFO, "<plain_auth>");
+ syslog(LOG_INFO, "<plain_auth>");
}
else if ((Imap->authstate == imap_as_expecting_multilineusername) ||
cbmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
}
else if ((Imap->authstate == imap_as_expecting_multilineusername) ||
cbmstrcasestr(ChrPtr(Imap->Cmd.CmdBuf), " LOGIN ")) {
-
IMAPM_
syslog(LOG_INFO, "LOGIN...");
+ syslog(LOG_INFO, "LOGIN...");
}
else {
}
else {
-
IMAP_
syslog(LOG_DEBUG, "%s", ChrPtr(Imap->Cmd.CmdBuf));
+ syslog(LOG_DEBUG, "%s", ChrPtr(Imap->Cmd.CmdBuf));
}
pchs = ChrPtr(Imap->Cmd.CmdBuf);
}
pchs = ChrPtr(Imap->Cmd.CmdBuf);
@@
-1593,16
+1588,16
@@
void imap_command_loop(void)
/* debug output the parsed vector */
{
int i;
/* debug output the parsed vector */
{
int i;
-
IMAP_
syslog(LOG_DEBUG, "----- %ld params", Imap->Cmd.num_parms);
+ syslog(LOG_DEBUG, "----- %ld params", Imap->Cmd.num_parms);
for (i=0; i < Imap->Cmd.num_parms; i++) {
if (Imap->Cmd.Params[i].len != strlen(Imap->Cmd.Params[i].Key))
for (i=0; i < Imap->Cmd.num_parms; i++) {
if (Imap->Cmd.Params[i].len != strlen(Imap->Cmd.Params[i].Key))
-
IMAP_
syslog(LOG_DEBUG, "*********** %ld != %ld : %s",
+ syslog(LOG_DEBUG, "*********** %ld != %ld : %s",
Imap->Cmd.Params[i].len,
strlen(Imap->Cmd.Params[i].Key),
Imap->Cmd.Params[i].Key);
else
Imap->Cmd.Params[i].len,
strlen(Imap->Cmd.Params[i].Key),
Imap->Cmd.Params[i].Key);
else
-
IMAP_
syslog(LOG_DEBUG, "%ld : %s",
+ syslog(LOG_DEBUG, "%ld : %s",
Imap->Cmd.Params[i].len,
Imap->Cmd.Params[i].Key);
}}
Imap->Cmd.Params[i].len,
Imap->Cmd.Params[i].Key);
}}
@@
-1655,7
+1650,7
@@
BAIL:
gettimeofday(&tv2, NULL);
total_time = (tv2.tv_usec + (tv2.tv_sec * 1000000)) - (tv1.tv_usec + (tv1.tv_sec * 1000000));
gettimeofday(&tv2, NULL);
total_time = (tv2.tv_usec + (tv2.tv_sec * 1000000)) - (tv1.tv_usec + (tv1.tv_sec * 1000000));
-
IMAP_
syslog(LOG_DEBUG, "IMAP command completed in %ld.%ld seconds",
+ syslog(LOG_DEBUG, "IMAP command completed in %ld.%ld seconds",
(total_time / 1000000),
(total_time % 1000000)
);
(total_time / 1000000),
(total_time % 1000000)
);
@@
-1680,10
+1675,6
@@
void imap_logout(int num_parms, ConstStr *Params)
const char *CitadelServiceIMAP="IMAP";
const char *CitadelServiceIMAPS="IMAPS";
const char *CitadelServiceIMAP="IMAP";
const char *CitadelServiceIMAPS="IMAPS";
-void SetIMAPDebugEnabled(const int n)
-{
- IMAPDebugEnabled = n;
-}
/*
* This function is called to register the IMAP extension with Citadel.
*/
/*
* This function is called to register the IMAP extension with Citadel.
*/
@@
-1739,7
+1730,6
@@
CTDL_MODULE_INIT(imap)
if (!threading)
{
if (!threading)
{
- CtdlRegisterDebugFlagHook(HKEY("imapsrv"), SetIMAPDebugEnabled, &IMAPDebugEnabled);
CtdlRegisterServiceHook(CtdlGetConfigInt("c_imap_port"),
NULL, imap_greeting, imap_command_loop, NULL, CitadelServiceIMAP);
#ifdef HAVE_OPENSSL
CtdlRegisterServiceHook(CtdlGetConfigInt("c_imap_port"),
NULL, imap_greeting, imap_command_loop, NULL, CitadelServiceIMAP);
#ifdef HAVE_OPENSSL
diff --git
a/citadel/modules/imap/serv_imap.h
b/citadel/modules/imap/serv_imap.h
index aa3ab2cdea464403b9e25196da4b5d4be8596891..bd5b93390b6a3402fb673120c82c462d3709e550 100644
(file)
--- a/
citadel/modules/imap/serv_imap.h
+++ b/
citadel/modules/imap/serv_imap.h
@@
-101,22
+101,10
@@
enum {
#define FDELIM '\\'
#define FDELIM '\\'
-extern int IMAPDebugEnabled;
-
#define IMAP ((citimap *)CC->session_specific_data)
#define CCCIMAP ((citimap *)CCC->session_specific_data)
#define IMAPDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (IMAPDebugEnabled != 0))
#define IMAP ((citimap *)CC->session_specific_data)
#define CCCIMAP ((citimap *)CCC->session_specific_data)
#define IMAPDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (IMAPDebugEnabled != 0))
-#define CCCID CCC->cs_pid
-#define IMAP_syslog(LEVEL, FORMAT, ...) \
- IMAPDBGLOG(LEVEL) syslog(LEVEL, \
- "IMAP %s CC[%d] " FORMAT, \
- IOSTR, CCCID, __VA_ARGS__)
-
-#define IMAPM_syslog(LEVEL, FORMAT) \
- IMAPDBGLOG(LEVEL) syslog(LEVEL, \
- "IMAP %s CC[%d] " FORMAT, \
- IOSTR, CCCID)
#define I_FLAG_NONE (0)
#define I_FLAG_LOGGED_IN (1<<0)
#define I_FLAG_NONE (0)
#define I_FLAG_LOGGED_IN (1<<0)