- Timestamp:
- 2011-12-23T12:44:08Z (13 years ago)
- Branches:
- master
- Children:
- 200e151
- Parents:
- 2d93a51e (diff), 41658da (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. - Location:
- protocols
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
r2d93a51e r792a93b 279 279 } 280 280 281 gboolean jabber_connected_ssl( gpointer data, void *source, b_input_condition cond )281 gboolean jabber_connected_ssl( gpointer data, int returncode, void *source, b_input_condition cond ) 282 282 { 283 283 struct im_connection *ic = data; … … 295 295 jd->ssl = NULL; 296 296 297 imcb_error( ic, "Could not connect to server" ); 298 imc_logout( ic, TRUE ); 297 if( returncode != 0 ) 298 { 299 char *err = ssl_verify_strerror( returncode ); 300 imcb_error( ic, "Certificate verification problem 0x%x: %s", 301 returncode, err ? err : "Unknown" ); 302 g_free( err ); 303 imc_logout( ic, FALSE ); 304 } 305 else 306 { 307 imcb_error( ic, "Could not connect to server" ); 308 imc_logout( ic, TRUE ); 309 } 310 299 311 return FALSE; 300 312 } … … 400 412 struct im_connection *ic = data; 401 413 struct jabber_data *jd = ic->proto_data; 402 char *xmlns ;414 char *xmlns, *tlsname; 403 415 404 416 xmlns = xt_find_attr( node, "xmlns" ); … … 426 438 427 439 jd->flags |= JFLAG_STARTTLS_DONE; 428 jd->ssl = ssl_starttls( jd->fd, jabber_connected_ssl, ic ); 440 441 /* If the user specified a server for the account, use this server as the 442 * hostname in the certificate verification. Else we use the domain from 443 * the username. */ 444 if( ic->acc->server && *ic->acc->server ) 445 tlsname = ic->acc->server; 446 else 447 tlsname = jd->server; 448 449 jd->ssl = ssl_starttls( jd->fd, tlsname, set_getbool( &ic->acc->set, "tls_verify" ), 450 jabber_connected_ssl, ic ); 429 451 430 452 return XT_HANDLED; -
protocols/jabber/jabber.c
r2d93a51e r792a93b 80 80 81 81 s = set_add( &acc->set, "tls", "try", set_eval_tls, acc ); 82 s->flags |= ACC_SET_OFFLINE_ONLY; 83 84 s = set_add( &acc->set, "tls_verify", "true", set_eval_bool, acc ); 82 85 s->flags |= ACC_SET_OFFLINE_ONLY; 83 86 … … 233 236 if( set_getbool( &acc->set, "ssl" ) ) 234 237 { 235 jd->ssl = ssl_connect( connect_to, set_getint( &acc->set, "port" ), jabber_connected_ssl, ic );238 jd->ssl = ssl_connect( connect_to, set_getint( &acc->set, "port" ), FALSE, jabber_connected_ssl, ic ); 236 239 jd->fd = jd->ssl ? ssl_getfd( jd->ssl ) : -1; 237 240 } -
protocols/jabber/jabber.h
r2d93a51e r792a93b 309 309 int jabber_write( struct im_connection *ic, char *buf, int len ); 310 310 gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond ); 311 gboolean jabber_connected_ssl( gpointer data, void *source, b_input_condition cond );311 gboolean jabber_connected_ssl( gpointer data, int returncode, void *source, b_input_condition cond ); 312 312 gboolean jabber_start_stream( struct im_connection *ic ); 313 313 void jabber_end_stream( struct im_connection *ic ); -
protocols/msn/soap.c
r2d93a51e r792a93b 60 60 struct im_connection *ic; 61 61 int ttl; 62 char *error; 62 63 63 64 char *url, *action, *payload; … … 158 159 } 159 160 161 if( http_req->status_code != 200 ) 162 soap_req->error = g_strdup( http_req->status_string ); 163 160 164 st = soap_req->handle_response( soap_req ); 161 165 … … 164 168 g_free( soap_req->action ); 165 169 g_free( soap_req->payload ); 166 soap_req->url = soap_req->action = soap_req->payload = NULL; 170 g_free( soap_req->error ); 171 soap_req->url = soap_req->action = soap_req->payload = soap_req->error = NULL; 167 172 168 173 if( st == MSN_SOAP_RETRY && --soap_req->ttl ) … … 253 258 g_free( soap_req->action ); 254 259 g_free( soap_req->payload ); 260 g_free( soap_req->error ); 255 261 g_free( soap_req ); 256 262 } … … 410 416 if( sd->secret == NULL ) 411 417 { 412 msn_auth_got_passport_token( ic, NULL, sd->error );418 msn_auth_got_passport_token( ic, NULL, sd->error ? sd->error : soap_req->error ); 413 419 return MSN_SOAP_OK; 414 420 } -
protocols/skype/skype.c
r2d93a51e r792a93b 1157 1157 } 1158 1158 1159 gboolean skype_connected(gpointer data, void *source, b_input_condition cond)1159 gboolean skype_connected(gpointer data, int returncode, void *source, b_input_condition cond) 1160 1160 { 1161 1161 struct im_connection *ic = data; … … 1185 1185 imcb_log(ic, "Connecting"); 1186 1186 sd->ssl = ssl_connect(set_getstr(&acc->set, "server"), 1187 set_getint(&acc->set, "port"), skype_connected, ic);1187 set_getint(&acc->set, "port"), FALSE, skype_connected, ic); 1188 1188 sd->fd = sd->ssl ? ssl_getfd(sd->ssl) : -1; 1189 1189 sd->username = g_strdup(acc->user);
Note: See TracChangeset
for help on using the changeset viewer.