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

Diff of /imapfilter/imap.c

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

revision 1.24 by lefcha, Tue Jun 18 21:13:50 2002 UTC revision 1.25 by lefcha, Sat Jul 13 14:11:08 2002 UTC
# Line 24  unsigned int send_command(int *sock, cha Line 24  unsigned int send_command(int *sock, cha
24  #endif  #endif
25    
26      socket_write(sock, cmd);      socket_write(sock, cmd);
27        
28      return tag++;      return tag++;
29  }  }
30    
# Line 43  int imap_noop(int *sock) Line 43  int imap_noop(int *sock)
43    
44      return send_command(sock, cmd);      return send_command(sock, cmd);
45  }  }
46    
47  #endif  #endif
48    
49    
# Line 99  int imap_login(int *sock, char *user, ch Line 100  int imap_login(int *sock, char *user, ch
100  {  {
101      int r;      int r;
102      char *cmd;      char *cmd;
103        
104      cmd = (char *) smalloc(MEDIUM_CMD);      cmd = (char *)smalloc(MEDIUM_CMD);
105    
106      verbose("Client request: LOGIN\n");      verbose("Client request: LOGIN\n");
107    
# Line 108  int imap_login(int *sock, char *user, ch Line 109  int imap_login(int *sock, char *user, ch
109               pass);               pass);
110    
111      r = send_command(sock, cmd);      r = send_command(sock, cmd);
112        
113      sfree(cmd);      sfree(cmd);
114    
115      return r;      return r;
# Line 123  int imap_list(int *sock, char *refer, ch Line 124  int imap_list(int *sock, char *refer, ch
124  {  {
125      int r;      int r;
126      char cmd[BIG_CMD];      char cmd[BIG_CMD];
127        
128      verbose("Client request: LIST\n");      verbose("Client request: LIST\n");
129        
130      snprintf(cmd, MEDIUM_CMD, "%X LIST \"%s\" \"%s\"\r\n", tag, refer,      snprintf(cmd, MEDIUM_CMD, "%X LIST \"%s\" \"%s\"\r\n", tag, refer,
131               mbox);               mbox);
132        
133      r = send_command(sock, cmd);      r = send_command(sock, cmd);
134        
135      return r;      return r;
136  }*/  }*/
137    
# Line 279  int imap_copy(int *sock, char *mesg, cha Line 280  int imap_copy(int *sock, char *mesg, cha
280  int imap_append(int *sock, char *mbox, unsigned int size)  int imap_append(int *sock, char *mbox, unsigned int size)
281  {  {
282      char cmd[MEDIUM_CMD];      char cmd[MEDIUM_CMD];
283        
284      verbose("Client request: APPEND\n");      verbose("Client request: APPEND\n");
285        
286      snprintf(cmd, MEDIUM_CMD, "%X APPEND \"%s\" {%d}\r\n", tag, mbox, size);      snprintf(cmd, MEDIUM_CMD, "%X APPEND \"%s\" {%d}\r\n", tag, mbox, size);
287        
288      return send_command(sock, cmd);      return send_command(sock, cmd);
289  }  }
290    
# Line 306  int imap_close(int *sock) Line 307  int imap_close(int *sock)
307    
308  /*  /*
309   * IMAP EXPUNGE: permanently removes any messages with the \Deleted flag set.   * IMAP EXPUNGE: permanently removes any messages with the \Deleted flag set.
310   *   */
311  int imap_expunge(int *sock)  int imap_expunge(int *sock)
312  {  {
313      char cmd[SMALL_CMD];      char cmd[SMALL_CMD];
# Line 316  int imap_expunge(int *sock) Line 317  int imap_expunge(int *sock)
317      snprintf(cmd, SMALL_CMD, "%X EXPUNGE\r\n", tag);      snprintf(cmd, SMALL_CMD, "%X EXPUNGE\r\n", tag);
318    
319      return send_command(sock, cmd);      return send_command(sock, cmd);
320  }*/  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26