30 |
/* |
/* |
31 |
* Connect to mail server. |
* Connect to mail server. |
32 |
*/ |
*/ |
|
#ifndef SSL_TLS |
|
|
int init_connection(char *serv, unsigned short int port) |
|
|
#else |
|
33 |
int init_connection(char *serv, unsigned short int port, |
int init_connection(char *serv, unsigned short int port, |
34 |
unsigned int protocol) |
unsigned int protocol) |
|
#endif |
|
35 |
{ |
{ |
36 |
struct sockaddr_in sa; |
struct sockaddr_in sa; |
37 |
struct hostent *he; |
struct hostent *he; |
38 |
|
|
39 |
|
#ifndef SSL_TLS |
40 |
|
if (protocol != SSL_DISABLED) { |
41 |
|
error("imapfilter: SSL not supported by this build\n"); |
42 |
|
return ERROR_SSL; |
43 |
|
} |
44 |
|
#endif |
45 |
|
|
46 |
memset((char *) &sa, 0, sizeof(struct sockaddr_in)); |
memset((char *) &sa, 0, sizeof(struct sockaddr_in)); |
47 |
|
|