projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a5ae0d9
)
Removed newlines from syslog in pop3 and imap modules
author
Art Cancro
<ajc@uncensored.citadel.org>
Sun, 13 Mar 2011 07:50:01 +0000
(
03:50
-0400)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 4 Sep 2011 15:02:54 +0000
(15:02 +0000)
citadel/modules/imap/imap_fetch.c
patch
|
blob
|
history
citadel/modules/imap/imap_list.c
patch
|
blob
|
history
citadel/modules/imap/imap_misc.c
patch
|
blob
|
history
citadel/modules/imap/imap_tools.c
patch
|
blob
|
history
citadel/modules/pop3/serv_pop3.c
patch
|
blob
|
history
diff --git
a/citadel/modules/imap/imap_fetch.c
b/citadel/modules/imap/imap_fetch.c
index fa6cc0c8492ed57c20fca25af0385110b9ecce06..db0fbeae83aa1c04260dc11f0c13468aa5c1ab76 100644
(file)
--- a/
citadel/modules/imap/imap_fetch.c
+++ b/
citadel/modules/imap/imap_fetch.c
@@
-243,7
+243,7
@@
void imap_fetch_rfc822(long msgnum, const char *whichfmt) {
syslog(LOG_DEBUG,
"RFC822: headers=" SIZE_T_FMT
", text=" SIZE_T_FMT
syslog(LOG_DEBUG,
"RFC822: headers=" SIZE_T_FMT
", text=" SIZE_T_FMT
- ", total=" SIZE_T_FMT
"\n"
,
+ ", total=" SIZE_T_FMT,
headers_size, text_size, total_size);
if (!strcasecmp(whichfmt, "RFC822.SIZE")) {
headers_size, text_size, total_size);
if (!strcasecmp(whichfmt, "RFC822.SIZE")) {
@@
-288,7
+288,7
@@
void imap_load_part(char *name, char *filename, char *partnum, char *disp,
char *desired_section;
desired_section = (char *)cbuserdata;
char *desired_section;
desired_section = (char *)cbuserdata;
- syslog(LOG_DEBUG, "imap_load_part() looking for %s, found %s
\n
",
+ syslog(LOG_DEBUG, "imap_load_part() looking for %s, found %s",
desired_section,
partnum
);
desired_section,
partnum
);
@@
-671,7
+671,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, '[', ']');
}
- syslog(LOG_DEBUG, "Section is: [%s]
\n
",
+ syslog(LOG_DEBUG, "Section is: [%s]",
(StrLength(section) == 0) ? "(empty)" : ChrPtr(section)
);
(StrLength(section) == 0) ? "(empty)" : ChrPtr(section)
);
@@
-705,7
+705,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) ) {
- syslog(LOG_DEBUG, "Partial is <%s>
\n
", ChrPtr(partial));
+ syslog(LOG_DEBUG, "Partial is <%s>", ChrPtr(partial));
}
if (Imap->cached_body == NULL) {
}
if (Imap->cached_body == NULL) {
@@
-1133,17
+1133,16
@@
void imap_do_fetch(citimap_command *Cmd) {
/* debug output the parsed vector */
{
int i;
/* debug output the parsed vector */
{
int i;
- syslog(LOG_DEBUG, "----- %ld params \n",
- 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))
- syslog(LOG_DEBUG, "*********** %ld != %ld : %s
\n
",
+ 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
- syslog(LOG_DEBUG, "%ld : %s
\n
",
+ syslog(LOG_DEBUG, "%ld : %s",
Cmd->Params[i].len,
Cmd->Params[i].Key);
}}
Cmd->Params[i].len,
Cmd->Params[i].Key);
}}
@@
-1468,7
+1467,7
@@
void imap_uidfetch(int num_parms, ConstStr *Params) {
MakeStringOf(Cmd.CmdBuf, 4);
#if 0
MakeStringOf(Cmd.CmdBuf, 4);
#if 0
- syslog(LOG_DEBUG, "-------%s--------
\n
", 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_list.c
b/citadel/modules/imap/imap_list.c
index 465c6ea4002a75f3121ce5c0c9c90d78ed1285f7..49c19a6666407eae59206ed5af5e7a28165b3ed5 100644
(file)
--- a/
citadel/modules/imap/imap_list.c
+++ b/
citadel/modules/imap/imap_list.c
@@
-377,7
+377,7
@@
void imap_list(int num_parms, ConstStr *Params)
&Params[i],
1);
&Params[i],
1);
- syslog(LOG_DEBUG, "evaluating <%s>
\n
", 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_misc.c
b/citadel/modules/imap/imap_misc.c
index 14cc8afa95e3ecbadd6c3c4aa162c59ab1c13343..203b75c3ece620fc6732610e76f475ca6efffa1f 100644
(file)
--- a/
citadel/modules/imap/imap_misc.c
+++ b/
citadel/modules/imap/imap_misc.c
@@
-355,10
+355,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) */
- syslog(LOG_DEBUG, "Converting CRLF to LF
\n
");
+ syslog(LOG_DEBUG, "Converting CRLF to LF");
StrBufToUnixLF(Imap->TransmittedMessage);
StrBufToUnixLF(Imap->TransmittedMessage);
- syslog(LOG_DEBUG, "Converting message format
\n
");
+ 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_tools.c
b/citadel/modules/imap/imap_tools.c
index 28fb95948eca6528f339ecb46da41449b876f36c..cb99d7a671406407ebc5e1fceea7f75be059f4c5 100644
(file)
--- a/
citadel/modules/imap/imap_tools.c
+++ b/
citadel/modules/imap/imap_tools.c
@@
-225,7
+225,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);
- /* syslog(LOG_DEBUG, "toimap %s
\r\n
", src); */
+ /* syslog(LOG_DEBUG, "toimap %s", src); */
for (;;)
{
for (;;)
{
@@
-291,7
+291,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);
- /* syslog(LOG_DEBUG, " -> %s
\r\n
", destp); */
+ /* syslog(LOG_DEBUG, " -> %s", destp); */
return string_end(&dest);
}
return string_end(&dest);
}
@@
-309,7
+309,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);
- /* syslog(LOG_DEBUG, "fromimap %s
\r\n
", src); */
+ /* syslog(LOG_DEBUG, "fromimap %s", src); */
do {
c = *p++;
do {
c = *p++;
@@
-367,7
+367,7
@@
static char* fromimap(char* destp, char* destend, const char* src)
}
} while (c != '\0');
}
} while (c != '\0');
- /* syslog(LOG_DEBUG, " -> %s
\r\n
", destp); */
+ /* syslog(LOG_DEBUG, " -> %s", destp); */
return string_end(&dest);
}
return string_end(&dest);
}
@@
-680,7
+680,7
@@
int imap_roomname(char *rbuf, int bufsize, const char *foldername)
ret = (0 | IR_MAILBOX);
exit:
ret = (0 | IR_MAILBOX);
exit:
- syslog(LOG_DEBUG, "(That translates to \"%s\")
\n
", rbuf);
+ syslog(LOG_DEBUG, "(That translates to \"%s\")", rbuf);
return(ret);
}
return(ret);
}
diff --git
a/citadel/modules/pop3/serv_pop3.c
b/citadel/modules/pop3/serv_pop3.c
index 89bfef80ec181e864b0ecc565a02c5d2e2f51217..ec98569c24c1d295718e5cd4a358fe01c9f35ecf 100644
(file)
--- a/
citadel/modules/pop3/serv_pop3.c
+++ b/
citadel/modules/pop3/serv_pop3.c
@@
-81,7
+81,7
@@
void pop3_cleanup_function(void) {
/* Don't do this stuff if this is not a POP3 session! */
if (CC->h_command_function != pop3_command_loop) return;
/* Don't do this stuff if this is not a POP3 session! */
if (CC->h_command_function != pop3_command_loop) return;
- syslog(LOG_DEBUG, "Performing POP3 cleanup hook
\n
");
+ syslog(LOG_DEBUG, "Performing POP3 cleanup hook");
if (POP3->msgs != NULL) free(POP3->msgs);
free(POP3);
if (POP3->msgs != NULL) free(POP3->msgs);
free(POP3);
@@
-134,7
+134,7
@@
void pop3_user(char *argbuf) {
strcpy(username, argbuf);
striplt(username);
strcpy(username, argbuf);
striplt(username);
- /* syslog(LOG_DEBUG, "Trying <%s>
\n
", username); */
+ /* syslog(LOG_DEBUG, "Trying <%s>", username); */
if (CtdlLoginExistingUser(NULL, username) == login_ok) {
cprintf("+OK Password required for %s\r\n", username);
}
if (CtdlLoginExistingUser(NULL, username) == login_ok) {
cprintf("+OK Password required for %s\r\n", username);
}
@@
-212,7
+212,7
@@
void pop3_login(void)
if (msgs >= 0) {
cprintf("+OK %s is logged in (%d messages)\r\n",
CC->user.fullname, msgs);
if (msgs >= 0) {
cprintf("+OK %s is logged in (%d messages)\r\n",
CC->user.fullname, msgs);
- syslog(LOG_NOTICE, "POP3 authenticated %s
\n
", CC->user.fullname);
+ syslog(LOG_NOTICE, "POP3 authenticated %s", CC->user.fullname);
}
else {
cprintf("-ERR Can't open your mailbox\r\n");
}
else {
cprintf("-ERR Can't open your mailbox\r\n");
@@
-230,7
+230,7
@@
void pop3_pass(char *argbuf) {
safestrncpy(password, argbuf, sizeof password);
striplt(password);
safestrncpy(password, argbuf, sizeof password);
striplt(password);
- /* syslog(LOG_DEBUG, "Trying <%s>
\n
", password); */
+ /* syslog(LOG_DEBUG, "Trying <%s>", password); */
if (CtdlTryPassword(password, strlen(password)) == pass_ok) {
pop3_login();
}
if (CtdlTryPassword(password, strlen(password)) == pass_ok) {
pop3_login();
}
@@
-569,15
+569,15
@@
void pop3_command_loop(void) {
time(&CC->lastcmd);
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
time(&CC->lastcmd);
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
- syslog(LOG_ERR, "Client disconnected: ending session.
\r\n
");
+ syslog(LOG_ERR, "Client disconnected: ending session.");
CC->kill_me = 1;
return;
}
if (!strncasecmp(cmdbuf, "PASS", 4)) {
CC->kill_me = 1;
return;
}
if (!strncasecmp(cmdbuf, "PASS", 4)) {
- syslog(LOG_INFO, "POP3: PASS...
\r\n
");
+ syslog(LOG_INFO, "POP3: PASS...");
}
else {
}
else {
- syslog(LOG_INFO, "POP3: %s
\r\n
", cmdbuf);
+ syslog(LOG_INFO, "POP3: %s", cmdbuf);
}
while (strlen(cmdbuf) < 5) strcat(cmdbuf, " ");
}
while (strlen(cmdbuf) < 5) strcat(cmdbuf, " ");