Changeset 2b7d2d1
- Timestamp:
- 2006-05-13T10:42:37Z (19 years ago)
- Branches:
- master
- Children:
- 309cb9e
- Parents:
- fc2ee0f
- Location:
- protocols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/events.h
rfc2ee0f r2b7d2d1 49 49 #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) 50 50 51 #define event_debug( x... ) printf( x ) 51 // #define event_debug( x... ) printf( x ) 52 #define event_debug( x... ) 52 53 53 54 G_MODULE_EXPORT void b_main_init(); -
protocols/ssl_gnutls.c
rfc2ee0f r2b7d2d1 48 48 }; 49 49 50 static voidssl_connected( gpointer data, gint source, b_input_condition cond );50 static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond ); 51 51 52 52 … … 81 81 } 82 82 83 static voidssl_handshake( gpointer data, gint source, b_input_condition cond );84 85 static voidssl_connected( gpointer data, gint source, b_input_condition cond )83 static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond ); 84 85 static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond ) 86 86 { 87 87 struct scd *conn = data; … … 96 96 g_free( conn ); 97 97 98 return ;98 return FALSE; 99 99 } 100 100 … … 102 102 gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr) conn->fd ); 103 103 104 ssl_handshake( data, source, cond );105 } 106 107 static voidssl_handshake( gpointer data, gint source, b_input_condition cond )104 return ssl_handshake( data, source, cond ); 105 } 106 107 static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond ) 108 108 { 109 109 struct scd *conn = data; 110 110 int st; 111 111 112 if( conn->inpa != -1 )113 {114 gaim_input_remove( conn->inpa );115 conn->inpa = -1;116 }117 118 112 if( ( st = gnutls_handshake( conn->session ) ) < 0 ) 119 113 { 120 114 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 121 115 { 122 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ),123 116 conn->inpa = b_input_add( conn->fd, ssl_getdirection( conn ), 117 ssl_handshake, data ); 124 118 } 125 119 else … … 142 136 conn->func( conn->data, conn, cond ); 143 137 } 138 139 return FALSE; 144 140 } 145 141 … … 187 183 188 184 if( conn->inpa != -1 ) 189 gaim_input_remove( conn->inpa );185 b_event_remove( conn->inpa ); 190 186 191 187 if( conn->established )
Note: See TracChangeset
for help on using the changeset viewer.