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

Diff of /imapfilter/imap.c

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

revision 1.33 by lefcha, Fri Mar 28 17:02:52 2003 UTC revision 1.34 by lefcha, Sat Jul 26 19:43:02 2003 UTC
# Line 32  send_command(int *sock, char *cmd) Line 32  send_command(int *sock, char *cmd)
32  }  }
33    
34    
35    #ifdef CRAM_MD5
36    /*
37     * Send to server data: a continuation command.
38     */
39    void
40    send_command_cont(int *sock, char *cmd)
41    {
42    #ifdef DEBUG
43            fprintf(stderr, "debug: sending command (%s):\n\n%s\r\n\n",
44                (sock == &sockpri ? "primary" : "auxiliary"), cmd);
45    #endif
46    
47            socket_write(sock, cmd);
48            socket_write(sock, "\r\n");
49    }
50    
51    #endif
52    
53    
54  #ifdef DEBUG  #ifdef DEBUG
55  /*  /*
56   * IMAP NOOP: does nothing always succeeds.   * IMAP NOOP: does nothing always succeeds.
# Line 92  imap_logout(int *sock) Line 111  imap_logout(int *sock)
111  }  }
112    
113    
114    #ifdef CRAM_MD5
115  /*  /*
116   * IMAP AUTHENTICATE: indicates authentication mechanism and performs an   * IMAP AUTHENTICATE: indicates authentication mechanism and performs an
117   * authentication protocol exchange.   * authentication protocol exchange.
118   */   */
119  int  int
120  imap_authenticate(int *sock, char *auth)  imap_authenticate(int *sock, char *auth, int cont)
121  {  {
122          char cmd[MEDIUM_CMD];          char cmd[MEDIUM_CMD];
123    
124          snprintf(cmd, MEDIUM_CMD, "%X AUTHENTICATE %s\r\n", tag, auth);          if (!cont) {
125                    snprintf(cmd, MEDIUM_CMD, "%X AUTHENTICATE %s\r\n", tag, auth);
126          return send_command(sock, cmd);                  return send_command(sock, cmd);
127            } else {
128                    send_command_cont(sock, auth);
129                    return 0;
130            }
131  }  }
132    
133    #endif
134    
135    
136  /*  /*
137   * IMAP LOGIN: identifies client to server.   * IMAP LOGIN: identifies client to server.

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26