Changes in protocols/ssl_openssl.c [19ac9c5:26fdfc5]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/ssl_openssl.c
r19ac9c5 r26fdfc5 52 52 }; 53 53 54 static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond ); 54 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond ); 55 55 56 56 57 … … 94 95 } 95 96 96 static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond );97 98 static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond )97 static void ssl_handshake( gpointer data, gint source, GaimInputCondition cond ); 98 99 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond ) 99 100 { 100 101 struct scd *conn = data; … … 103 104 return ssl_handshake( data, -1, cond ); 104 105 105 /* We can do at least the handshake with non-blocking I/O*/106 /* Make it non-blocking at least during the handshake... */ 106 107 sock_make_nonblocking( conn->fd ); 107 108 SSL_set_fd( conn->ssl, conn->fd ); … … 110 111 } 111 112 112 static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond )113 static void ssl_handshake( gpointer data, gint source, GaimInputCondition cond ) 113 114 { 114 115 struct scd *conn = data; 115 116 int st; 117 118 if( conn->inpa != -1 ) 119 { 120 gaim_input_remove( conn->inpa ); 121 conn->inpa = -1; 122 } 116 123 117 124 if( ( st = SSL_connect( conn->ssl ) ) < 0 ) … … 121 128 goto ssl_connected_failure; 122 129 123 conn->inpa = b_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data );124 return FALSE;130 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data ); 131 return; 125 132 } 126 133 … … 128 135 sock_make_blocking( conn->fd ); /* For now... */ 129 136 conn->func( conn->data, conn, cond ); 130 return FALSE;137 return; 131 138 132 139 ssl_connected_failure: … … 144 151 if( source >= 0 ) closesocket( source ); 145 152 g_free( conn ); 146 147 return FALSE;148 153 } 149 154 … … 199 204 200 205 if( conn->inpa != -1 ) 201 b_event_remove( conn->inpa );206 gaim_input_remove( conn->inpa ); 202 207 203 208 if( conn->established ) … … 216 221 } 217 222 218 b_input_condition ssl_getdirection( void *conn )223 GaimInputCondition ssl_getdirection( void *conn ) 219 224 { 220 225 return( ((struct scd*)conn)->lasterr == SSL_ERROR_WANT_WRITE ? GAIM_INPUT_WRITE : GAIM_INPUT_READ );
Note: See TracChangeset
for help on using the changeset viewer.