Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 13381:d1b29fb3b6d0
[gaim-migrate @ 15754]
peer_connection->conn appears to be NULL in certain situations, it is preferable not to crash when this happens.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 02 Mar 2006 22:55:12 +0000 |
parents | 554575d1f9b5 |
children | 8355b578a21e |
comparison
equal
deleted
inserted
replaced
13380:c1f5d9858c1d | 13381:d1b29fb3b6d0 |
---|---|
892 char *tmp, *x; | 892 char *tmp, *x; |
893 int i, j; | 893 int i, j; |
894 | 894 |
895 if (!name) | 895 if (!name) |
896 return NULL; | 896 return NULL; |
897 | 897 |
898 x = strchr(name, '-'); | 898 x = strchr(name, '-'); |
899 | 899 |
900 if (!x) return NULL; | 900 if (!x) return NULL; |
901 x = strchr(++x, '-'); | 901 x = strchr(++x, '-'); |
902 if (!x) return NULL; | 902 if (!x) return NULL; |
2358 gaim_debug_info("oscar", "AAA - in oscar_xfer_cancel_recv\n"); | 2358 gaim_debug_info("oscar", "AAA - in oscar_xfer_cancel_recv\n"); |
2359 | 2359 |
2360 if (gaim_xfer_get_status(xfer) != GAIM_XFER_STATUS_CANCEL_REMOTE) | 2360 if (gaim_xfer_get_status(xfer) != GAIM_XFER_STATUS_CANCEL_REMOTE) |
2361 aim_im_sendch2_sendfile_cancel(peer_connection->sess, peer_connection); | 2361 aim_im_sendch2_sendfile_cancel(peer_connection->sess, peer_connection); |
2362 | 2362 |
2363 oscar_connection_destroy(peer_connection->sess, peer_connection->conn); | 2363 if(peer_connection->sess && peer_connection->conn) |
2364 oscar_connection_destroy(peer_connection->sess, peer_connection->conn); | |
2364 aim_oft_destroyinfo(peer_connection); | 2365 aim_oft_destroyinfo(peer_connection); |
2365 xfer->data = NULL; | 2366 xfer->data = NULL; |
2366 od->file_transfers = g_slist_remove(od->file_transfers, xfer); | 2367 od->file_transfers = g_slist_remove(od->file_transfers, xfer); |
2367 } | 2368 } |
2368 | 2369 |
5204 | 5205 |
5205 return 1; | 5206 return 1; |
5206 } | 5207 } |
5207 | 5208 |
5208 /* | 5209 /* |
5209 * We get this error when there was an error in the locate family. This | 5210 * We get this error when there was an error in the locate family. This |
5210 * happens when you request info of someone who is offline. | 5211 * happens when you request info of someone who is offline. |
5211 */ | 5212 */ |
5212 static int gaim_parse_locerr(OscarSession *sess, FlapFrame *fr, ...) { | 5213 static int gaim_parse_locerr(OscarSession *sess, FlapFrame *fr, ...) { |
5213 gchar *buf; | 5214 gchar *buf; |
5214 va_list ap; | 5215 va_list ap; |
7459 | 7460 |
7460 if (reason == NULL) | 7461 if (reason == NULL) |
7461 reason = g_strdup(_("No reason given.")); | 7462 reason = g_strdup(_("No reason given.")); |
7462 | 7463 |
7463 dialog_msg = g_strdup_printf( | 7464 dialog_msg = g_strdup_printf( |
7464 _("The user %s wants to add %s to their buddy list for the following reason:\n%s"), | 7465 _("The user %s wants to add %s to their buddy list for the following reason:\n%s"), |
7465 nombre, gaim_account_get_username(account), reason); | 7466 nombre, gaim_account_get_username(account), reason); |
7466 g_free(reason); | 7467 g_free(reason); |
7467 | 7468 |
7468 data = g_new(struct name_data, 1); | 7469 data = g_new(struct name_data, 1); |
7469 data->gc = gc; | 7470 data->gc = gc; |