1 |
#include <stdio.h> |
#include <stdio.h> |
2 |
#include <string.h> |
#include <string.h> |
|
#include <stdlib.h> |
|
|
#include <unistd.h> |
|
|
#include <errno.h> |
|
3 |
|
|
4 |
#include "config.h" |
#include "config.h" |
5 |
#include "imapfilter.h" |
#include "imapfilter.h" |
6 |
#include "data.h" |
#include "buffer.h" |
7 |
|
|
8 |
|
|
9 |
extern conn_t connpri, connaux; |
extern conn_t connpri, connaux; |
13 |
static unsigned int tag = 0; /* Every IMAP command is prefixed with a |
static unsigned int tag = 0; /* Every IMAP command is prefixed with a |
14 |
* unique [:alnum:] string. */ |
* unique [:alnum:] string. */ |
15 |
|
|
16 |
|
|
17 |
|
unsigned int send_command(conn_t * conn, char *cmd); |
18 |
|
void send_command_cont(conn_t * conn, char *cmd); |
19 |
|
|
20 |
|
|
21 |
/* |
/* |
22 |
* Send to server data; a command. |
* Send to server data; a command. |
23 |
*/ |
*/ |
51 |
socket_write(conn, cmd); |
socket_write(conn, cmd); |
52 |
socket_write(conn, "\r\n"); |
socket_write(conn, "\r\n"); |
53 |
} |
} |
|
|
|
54 |
#endif |
#endif |
55 |
|
|
56 |
|
|
68 |
|
|
69 |
return send_command(conn, obuf.data); |
return send_command(conn, obuf.data); |
70 |
} |
} |
|
|
|
71 |
#endif |
#endif |
72 |
|
|
73 |
|
|
152 |
return 0; |
return 0; |
153 |
} |
} |
154 |
} |
} |
|
|
|
155 |
#endif |
#endif |
156 |
|
|
157 |
|
|