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

Diff of /imapfilter/response.c

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

revision 1.51 by lefcha, Sat Feb 14 22:48:04 2004 UTC revision 1.52 by lefcha, Sat Feb 14 23:08:31 2004 UTC
# Line 13  Line 13 
13    
14    
15  extern connection_t connpri, connaux;  extern connection_t connpri, connaux;
16    extern options_t opts;
17  extern jmp_buf acctloop;  extern jmp_buf acctloop;
18    
19  buffer_t ibuf;                  /* Input buffer. */  buffer_t ibuf;                  /* Input buffer. */
# Line 124  response_capability(connection_t * conn, Line 125  response_capability(connection_t * conn,
125                  response_bye(ibuf.data);                  response_bye(ibuf.data);
126          } while (!strcasestr(ibuf.data, ultostr(tag, 16)));          } while (!strcasestr(ibuf.data, ultostr(tag, 16)));
127    
128          if (strcasestr(ibuf.data, "IMAP4rev1"))          if (opts.force_protocol == PROTOCOL_NONE) {
129                  conn->prot |= PROTOCOL_IMAP4REV1;                  if (strcasestr(ibuf.data, "IMAP4rev1"))
130          else if (strcasestr(ibuf.data, "IMAP4"))                          conn->prot = PROTOCOL_IMAP4REV1;
131                  conn->caps |= PROTOCOL_IMAP4;                  else if (strcasestr(ibuf.data, "IMAP4"))
132          else {                          conn->prot = PROTOCOL_IMAP4;
133                  error("server supports neither the IMAP4rev1 nor the "                  else {
134                      "IMAP4 protocol\n");                          error("server supports neither the IMAP4rev1 nor the "
135                  return -2;                              "IMAP4 protocol\n");
136          }                          return -2;
137                    }
138            } else
139                    conn->prot = opts.force_protocol;
140    
141          if (strcasestr(ibuf.data, "NAMESPACE"))          if (strcasestr(ibuf.data, "NAMESPACE"))
142                  conn->caps |= CAPABILITY_NAMESPACE;                  conn->caps |= CAPABILITY_NAMESPACE;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26