Changeset b72caac for protocols/ssl_openssl.c
- Timestamp:
- 2006-06-21T16:34:33Z (18 years ago)
- Branches:
- master
- Children:
- 59f5c42a
- Parents:
- 3af70b0 (diff), df417ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/ssl_openssl.c
r3af70b0 rb72caac 52 52 }; 53 53 54 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond ); 55 54 static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond ); 56 55 57 56 … … 95 94 } 96 95 97 static void ssl_handshake( gpointer data, gint source, GaimInputCondition cond );98 99 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond )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 ) 100 99 { 101 100 struct scd *conn = data; … … 104 103 return ssl_handshake( data, -1, cond ); 105 104 106 /* Make it non-blocking at least during the handshake...*/105 /* We can do at least the handshake with non-blocking I/O */ 107 106 sock_make_nonblocking( conn->fd ); 108 107 SSL_set_fd( conn->ssl, conn->fd ); … … 111 110 } 112 111 113 static void ssl_handshake( gpointer data, gint source, GaimInputCondition cond )112 static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond ) 114 113 { 115 114 struct scd *conn = data; 116 115 int st; 117 118 if( conn->inpa != -1 )119 {120 gaim_input_remove( conn->inpa );121 conn->inpa = -1;122 }123 116 124 117 if( ( st = SSL_connect( conn->ssl ) ) < 0 ) … … 128 121 goto ssl_connected_failure; 129 122 130 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data );131 return ;123 conn->inpa = b_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data ); 124 return FALSE; 132 125 } 133 126 … … 135 128 sock_make_blocking( conn->fd ); /* For now... */ 136 129 conn->func( conn->data, conn, cond ); 137 return ;130 return FALSE; 138 131 139 132 ssl_connected_failure: … … 151 144 if( source >= 0 ) closesocket( source ); 152 145 g_free( conn ); 146 147 return FALSE; 153 148 } 154 149 … … 204 199 205 200 if( conn->inpa != -1 ) 206 gaim_input_remove( conn->inpa );201 b_event_remove( conn->inpa ); 207 202 208 203 if( conn->established ) … … 221 216 } 222 217 223 GaimInputCondition ssl_getdirection( void *conn )218 b_input_condition ssl_getdirection( void *conn ) 224 219 { 225 220 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.