/[mailutils]/mailutils/imap4d/idle.c
ViewVC logotype

Diff of /mailutils/imap4d/idle.c

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

revision 1.1 by gray, Tue Jan 28 21:42:27 2003 UTC revision 1.2 by gray, Wed Jan 29 13:05:19 2003 UTC
# Line 21  int Line 21  int
21  imap4d_idle (struct imap4d_command *command, char *arg)  imap4d_idle (struct imap4d_command *command, char *arg)
22  {  {
23    char *sp;    char *sp;
24      time_t start;
25        
26    if (util_getword (arg, &sp))    if (util_getword (arg, &sp))
27      return util_finish (command, RESP_BAD, "Too many args");      return util_finish (command, RESP_BAD, "Too many args");
# Line 31  imap4d_idle (struct imap4d_command *comm Line 32  imap4d_idle (struct imap4d_command *comm
32    util_send ("+ idling\r\n");    util_send ("+ idling\r\n");
33    util_flush_output ();    util_flush_output ();
34    
35      start = time (NULL);
36    while (1)    while (1)
37      {      {
38        if (util_wait_input (5))        if (util_wait_input (5))
# Line 46  imap4d_idle (struct imap4d_command *comm Line 48  imap4d_idle (struct imap4d_command *comm
48            if (rc)            if (rc)
49              break;              break;
50          }          }
51          else if (time (NULL) - start > daemon_param.timeout)
52            imap4d_bye (ERR_TIMEOUT);
53    
54        imap4d_sync ();        imap4d_sync ();
55        util_flush_output ();        util_flush_output ();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26