X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fpop3client%2Fserv_pop3client.c;h=7cc41a1778f42b6e020353cd2dc1269d8a43dcf5;hp=e6ea572c96b29c4e56a999605e301156fdac4e26;hb=fdd218dbbc025b0b18e21ade3901c43f7365deeb;hpb=28ddf7d47f819d8c1d33be687a40ff77be80bf5c diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index e6ea572c9..7cc41a177 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -101,7 +101,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 CtdlLogPrintf(CTDL_DEBUG, "Connected!\n"); /* Read the server greeting */ - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; @@ -116,7 +116,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "USER %s\r", pop3user); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; @@ -127,7 +127,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "PASS %s\r", pop3pass); CtdlLogPrintf(CTDL_DEBUG, "\n"); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; @@ -138,7 +138,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "LIST\r"); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; @@ -149,7 +149,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 if (CtdlThreadCheckStop()) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); msg_to_fetch = atoi(buf); if (msg_to_fetch > 0) { @@ -172,7 +172,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "UIDL %d\r", msglist[i]); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; extract_token(this_uidl, buf, 2, ' ', sizeof this_uidl); @@ -198,7 +198,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "RETR %d\r", msglist[i]); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); if (strncasecmp(buf, "+OK", 3)) goto bail; @@ -206,7 +206,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 goto bail; /* If we get to this point, the message is on its way. Read it. */ - body = CtdlReadMessageBody(HKEY("."), config.c_maxmsglen, NULL, 1, sock); + body = CtdlReadMessageBody(HKEY("."), config.c_maxmsglen, NULL, 1, &sock); if (body == NULL) goto bail; CtdlLogPrintf(CTDL_DEBUG, "Converting message...\n"); @@ -222,7 +222,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "DELE %d\r", msglist[i]); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); /* errors here are non-fatal */ } @@ -240,7 +240,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 snprintf(buf, sizeof buf, "QUIT\r"); CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf); if (sock_puts(sock, buf) <0) goto bail; - if (sock_getln(sock, buf, sizeof buf) < 0) goto bail; + if (sock_getln(&sock, buf, sizeof buf) < 0) goto bail; CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf); bail: sock_close(sock); if (msglist) free(msglist);