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

Diff of /imapfilter/socket.c

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

revision 1.18 by lefcha, Tue Jun 18 21:21:58 2002 UTC revision 1.19 by lefcha, Fri Jul 26 14:42:01 2002 UTC
# Line 36  int init_connection(int *sock, char *ser Line 36  int init_connection(int *sock, char *ser
36  {  {
37      struct sockaddr_in sa;      struct sockaddr_in sa;
38      struct hostent *he;      struct hostent *he;
39        
40  #ifndef SSL_TLS  #ifndef SSL_TLS
41      if (protocol != SSL_DISABLED) {      if (protocol != SSL_DISABLED) {
42          error("imapfilter: SSL not supported by this build\n");          error("imapfilter: SSL not supported by this build\n");
# Line 44  int init_connection(int *sock, char *ser Line 44  int init_connection(int *sock, char *ser
44      }      }
45  #endif  #endif
46    
47      memset((char *) &sa, 0, sizeof(struct sockaddr_in));      memset((char *)&sa, 0, sizeof(struct sockaddr_in));
48    
49      *sock = socket(PF_INET, SOCK_STREAM, 0);      *sock = socket(PF_INET, SOCK_STREAM, 0);
50    
# Line 75  int init_connection(int *sock, char *ser Line 75  int init_connection(int *sock, char *ser
75  #ifdef SSL_TLS  #ifdef SSL_TLS
76      if (protocol != SSL_DISABLED)      if (protocol != SSL_DISABLED)
77          if (!ssl_init(sock, protocol)) {          if (!ssl_init(sock, protocol)) {
78              info("Connected to %s using %s.\n", serv, SSL_get_cipher(ssl));              if (sock == &sockpri)
79                    info("Connected to %s using %s.\n", serv,
80                         SSL_get_cipher(ssl));
81              return 0;              return 0;
82          } else          } else
83              return ERROR_SSL;              return ERROR_SSL;
# Line 83  int init_connection(int *sock, char *ser Line 85  int init_connection(int *sock, char *ser
85          ssl = NULL;          ssl = NULL;
86  #endif  #endif
87    
88      info("Connected to %s.\n", serv);      if (sock == &sockpri)
89            info("Connected to %s.\n", serv);
90    
91      return 0;      return 0;
92  }  }
# Line 161  int ssl_init(int *sock, unsigned int pro Line 164  int ssl_init(int *sock, unsigned int pro
164    
165      return 0;      return 0;
166  }  }
167    
168  #endif  #endif
169    
170    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26