Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/clientlogin.c @ 31396:6f9a43a2b716
I noticed a NULL printf crash from the first chunk of this change.
In the second chunk I changed the code to match the error message from
the first chunk. I prefer this message.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Nov 2010 09:54:54 +0000 |
parents | f8f853ab3aba |
children | 7df08e88d9bb |
comparison
equal
deleted
inserted
replaced
31395:a76cf8ecb0c5 | 31396:6f9a43a2b716 |
---|---|
333 if (error_message != NULL || len == 0) { | 333 if (error_message != NULL || len == 0) { |
334 gchar *tmp; | 334 gchar *tmp; |
335 /* Note to translators: The first %s is a URL, the second is an | 335 /* Note to translators: The first %s is a URL, the second is an |
336 error message. */ | 336 error message. */ |
337 tmp = g_strdup_printf(_("Error requesting %s: %s"), | 337 tmp = g_strdup_printf(_("Error requesting %s: %s"), |
338 get_start_oscar_session_url(od), error_message); | 338 get_start_oscar_session_url(od), error_message ? |
339 error_message : _("The server returned an empty response")); | |
339 purple_connection_error_reason(gc, | 340 purple_connection_error_reason(gc, |
340 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); | 341 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); |
341 g_free(tmp); | 342 g_free(tmp); |
342 return; | 343 return; |
343 } | 344 } |
566 | 567 |
567 od->url_data = NULL; | 568 od->url_data = NULL; |
568 | 569 |
569 if (error_message != NULL || len == 0) { | 570 if (error_message != NULL || len == 0) { |
570 gchar *tmp; | 571 gchar *tmp; |
571 if (error_message != NULL) | 572 tmp = g_strdup_printf(_("Error requesting %s: %s"), |
572 tmp = g_strdup_printf(_("Error requesting %s: %s"), | 573 get_client_login_url(od), error_message ? |
573 get_client_login_url(od), error_message); | 574 error_message : _("The server returned an empty response")); |
574 else | |
575 tmp = g_strdup_printf(_("Error requesting %s"), | |
576 get_client_login_url(od)); | |
577 purple_connection_error_reason(gc, | 575 purple_connection_error_reason(gc, |
578 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); | 576 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); |
579 g_free(tmp); | 577 g_free(tmp); |
580 return; | 578 return; |
581 } | 579 } |