/[imapfilter]/imapfilter/response.c
ViewVC logotype

Diff of /imapfilter/response.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23.2.4 by lefcha, Sun Sep 29 19:54:58 2002 UTC revision 1.23.2.5 by lefcha, Sat Nov 9 14:18:23 2002 UTC
# Line 271  int search_response(int *sock, unsigned Line 271  int search_response(int *sock, unsigned
271  /*  /*
272   * Process the data that server sent due to IMAP FETCH client request.   * Process the data that server sent due to IMAP FETCH client request.
273   */   */
274  int fetch_response(int *sock, int reset, char *fetch)  int fetch_response(int *sock, unsigned int tag, int reset, char *fetch)
275  {  {
276      char buf[RESPONSE_BUF];      char buf[RESPONSE_BUF];
277      unsigned int i;      unsigned int i;
# Line 284  int fetch_response(int *sock, int reset, Line 284  int fetch_response(int *sock, int reset,
284      }      }
285      i = 0;      i = 0;
286    
287      receive_response(sock, buf);      reset_vbuf();
     bye_response(buf);  
288    
289      b = buf;      do {
290            receive_response(sock, buf);
291            bye_response(buf);
292            check_vbuf(strlen(buf));
293            strncat(vbuf, buf, vbufs - strlen(vbuf));
294        } while (strlen(vbuf) < RESPONSE_BUF &&
295                 !strcasestr(buf, ultostr(tag, 16)));
296    
297      if (!s) {      b = vbuf;
298          b = strchr(b, '{');  
299          b++;      if (!s && (b = strstr(b, "}\r\n"))) {
300          s = atoi(b) - 2;          while (b - vbuf > 0)
301                if (*--b == '{')
302                    break;
303            s = atoi(++b) - 2;
304          b = strchr(b, '}');          b = strchr(b, '}');
305          b += 3;          b += 3;
306      }      }

Legend:
Removed from v.1.23.2.4  
changed lines
  Added in v.1.23.2.5

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26