Mercurial > pidgin
comparison plugins/ssl/ssl-nss.c @ 13529:43268b823440
[gaim-migrate @ 15906]
NSPR and NSS errors are negative
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 20 Mar 2006 17:27:51 +0000 |
parents | a587a6c6149c |
children | c8ebbc0110f4 |
comparison
equal
deleted
inserted
replaced
13528:fe9f41df4b0e | 13529:43268b823440 |
---|---|
218 if(SSL_ForceHandshake(nss_data->in) != SECSuccess) { | 218 if(SSL_ForceHandshake(nss_data->in) != SECSuccess) { |
219 set_errno(PR_GetError()); | 219 set_errno(PR_GetError()); |
220 if (errno == EAGAIN || errno == EWOULDBLOCK) | 220 if (errno == EAGAIN || errno == EWOULDBLOCK) |
221 return; | 221 return; |
222 | 222 |
223 gaim_debug_error("nss", "Handshake failed %u\n", PR_GetError()); | 223 gaim_debug_error("nss", "Handshake failed %d\n", PR_GetError()); |
224 | 224 |
225 if (gsc->error_cb != NULL) | 225 if (gsc->error_cb != NULL) |
226 gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED, gsc->connect_cb_data); | 226 gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED, gsc->connect_cb_data); |
227 | 227 |
228 gaim_ssl_close(gsc); | 228 gaim_ssl_close(gsc); |
263 | 263 |
264 socket_opt.option = PR_SockOpt_Nonblocking; | 264 socket_opt.option = PR_SockOpt_Nonblocking; |
265 socket_opt.value.non_blocking = PR_TRUE; | 265 socket_opt.value.non_blocking = PR_TRUE; |
266 | 266 |
267 if (PR_SetSocketOption(nss_data->fd, &socket_opt) != PR_SUCCESS) | 267 if (PR_SetSocketOption(nss_data->fd, &socket_opt) != PR_SUCCESS) |
268 gaim_debug_warning("nss", "unable to set socket into non-blocking mode: %u\n", PR_GetError()); | 268 gaim_debug_warning("nss", "unable to set socket into non-blocking mode: %d\n", PR_GetError()); |
269 | 269 |
270 nss_data->in = SSL_ImportFD(NULL, nss_data->fd); | 270 nss_data->in = SSL_ImportFD(NULL, nss_data->fd); |
271 | 271 |
272 if (nss_data->in == NULL) | 272 if (nss_data->in == NULL) |
273 { | 273 { |