Changes in / [dd9a51b:8a9afe4]
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/Makefile
rdd9a51b r8a9afe4 10 10 11 11 # [SH] Program variables 12 objects = md5.o nogaim.o proxy.o sha.o util.o $(SSL_CLIENT)12 objects = http_client.o md5.o nogaim.o proxy.o sha.o $(SSL_CLIENT) util.o 13 13 14 14 # [SH] The next two lines should contain the directory name (in $(subdirs)) -
protocols/proxy.c
rdd9a51b r8a9afe4 106 106 if (condition & GAIM_WRITE_COND) 107 107 gaim_cond |= GAIM_INPUT_WRITE; 108 // if (condition & GAIM_ERR_COND)109 // fprintf( stderr, "ERROR! fd=%d\n", g_io_channel_unix_get_fd( source ) );110 108 111 109 closure->function(closure->data, g_io_channel_unix_get_fd(source), gaim_cond); -
protocols/ssl_bogus.c
rdd9a51b r8a9afe4 28 28 int ssl_errno; 29 29 30 void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )30 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ) 31 31 { 32 32 return( NULL ); -
protocols/ssl_client.h
rdd9a51b r8a9afe4 33 33 extern int ssl_errno; 34 34 35 typedef void (* SslInputFunction)(gpointer, void*, GaimInputCondition);35 typedef void (*ssl_input_function)(gpointer, void*, GaimInputCondition); 36 36 37 G_MODULE_EXPORT void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data );37 G_MODULE_EXPORT void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ); 38 38 G_MODULE_EXPORT int ssl_read( void *conn, char *buf, int len ); 39 39 G_MODULE_EXPORT int ssl_write( void *conn, const char *buf, int len ); 40 40 G_MODULE_EXPORT void ssl_disconnect( void *conn_ ); 41 41 G_MODULE_EXPORT int ssl_getfd( void *conn ); 42 G_MODULE_EXPORT GaimInputCondition ssl_getdirection( void *conn ); -
protocols/ssl_gnutls.c
rdd9a51b r8a9afe4 38 38 struct scd 39 39 { 40 SslInputFunction func;40 ssl_input_function func; 41 41 gpointer data; 42 42 int fd; … … 51 51 52 52 53 void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )53 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ) 54 54 { 55 55 struct scd *conn = g_new0( struct scd, 1 ); … … 117 117 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 118 118 { 119 conn->inpa = gaim_input_add( conn->fd, 120 gnutls_record_get_direction( conn->session ) ? 121 GAIM_INPUT_WRITE : GAIM_INPUT_READ, 119 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ), 122 120 ssl_handshake, data ); 123 121 } … … 145 143 int ssl_read( void *conn, char *buf, int len ) 146 144 { 145 int st; 146 147 147 if( !((struct scd*)conn)->established ) 148 148 { … … 151 151 } 152 152 153 return( gnutls_record_recv( ((struct scd*)conn)->session, buf, len ) ); 154 153 st = gnutls_record_recv( ((struct scd*)conn)->session, buf, len ); 154 155 ssl_errno = SSL_OK; 156 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 157 ssl_errno = SSL_AGAIN; 158 159 return st; 155 160 } 156 161 157 162 int ssl_write( void *conn, const char *buf, int len ) 158 163 { 164 int st; 165 159 166 if( !((struct scd*)conn)->established ) 160 167 { … … 163 170 } 164 171 165 return( gnutls_record_send( ((struct scd*)conn)->session, buf, len ) ); 172 st = gnutls_record_send( ((struct scd*)conn)->session, buf, len ); 173 174 ssl_errno = SSL_OK; 175 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 176 ssl_errno = SSL_AGAIN; 177 178 return st; 166 179 } 167 180 … … 184 197 return( ((struct scd*)conn)->fd ); 185 198 } 199 200 GaimInputCondition ssl_getdirection( void *conn ) 201 { 202 return( gnutls_record_get_direction( ((struct scd*)conn)->session ) ? 203 GAIM_INPUT_WRITE : GAIM_INPUT_READ ); 204 } -
protocols/ssl_nss.c
rdd9a51b r8a9afe4 45 45 struct scd 46 46 { 47 SslInputFunction func;47 ssl_input_function func; 48 48 gpointer data; 49 49 int fd; … … 91 91 92 92 93 void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )93 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ) 94 94 { 95 95 struct scd *conn = g_new0( struct scd, 1 ); -
protocols/ssl_openssl.c
rdd9a51b r8a9afe4 41 41 struct scd 42 42 { 43 SslInputFunction func;43 ssl_input_function func; 44 44 gpointer data; 45 45 int fd; … … 54 54 55 55 56 void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )56 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ) 57 57 { 58 58 struct scd *conn = g_new0( struct scd, 1 ); -
sock.h
rdd9a51b r8a9afe4 1 #include <errno.h> 2 #include <fcntl.h> 3 1 4 #ifndef _WIN32 2 5 #include <unistd.h>
Note: See TracChangeset
for help on using the changeset viewer.