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

Diff of /imapfilter/response.c

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

revision 1.18 by lefcha, Sat Dec 8 14:42:25 2001 UTC revision 1.19 by lefcha, Fri Jan 25 17:10:17 2002 UTC
# Line 145  int status_response(unsigned int tag, ch Line 145  int status_response(unsigned int tag, ch
145          unseen = strtoul(c, NULL, 10);          unseen = strtoul(c, NULL, 10);
146      }      }
147      if (!exist) {      if (!exist) {
148          info("No messages in mailbox %s.\n", mbox);          info("No messages in mailbox \"%s\".\n", mbox);
149          return -2;          return -2;
150      }      }
151      info("%d message%s, %d recent, %d unseen, in mailbox %s.\n", exist,      info("%d message%s, %d recent, %d unseen, in mailbox \"%s\".\n", exist,
152           plural(exist), recent, unseen, mbox);           plural(exist), recent, unseen, mbox);
153    
154      return r;      return r;
# Line 312  int fetch_response(unsigned int tag) Line 312  int fetch_response(unsigned int tag)
312   */   */
313  int copy_response(unsigned int tag)  int copy_response(unsigned int tag)
314  {  {
315        int r = RESPONSE_OK;
316        
317      char buf[RESPONSE_BUF];      char buf[RESPONSE_BUF];
318    
319      do      do
320          receive_response(buf);          receive_response(buf);
321      while (!strcasestr(buf, ultostr(tag, 16)));      while (!strcasestr(buf, ultostr(tag, 16)));
322    
323      if (analyze_response(buf) == RESPONSE_NO &&      if ((r = analyze_response(buf)) == RESPONSE_NO &&
324          strcasestr(buf, "[TRYCREATE]"))          strcasestr(buf, "[TRYCREATE]"))
325          return RESPONSE_TRYCREATE;          return RESPONSE_TRYCREATE;
326    
327      return RESPONSE_OK;      return r;
328  }  }
329    
330    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26