Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.c @ 21121:35b4f1dc4c8d
replace most calls to strerror with calls to g_strerror. strerror will return
a locale-specific string in the locale-specific encoding, which isn't
guaranteed to be UTF-8. g_strerror will always return a UTF-8 string.
I left gg and zephyr untouched, since gg doesn't include glib headers yet,
and zephyr does something weird with a #define for strerror. Someone more
familliar with those should take a look.
And the win32 guys should check and see if I screwed something up, since
they had strerror #defined to something else.
This should fix #2247 (and maybe some mystery crashes)
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 Nov 2007 17:52:28 +0000 |
parents | 3cc856ca2338 |
children | 6de09629f091 |
comparison
equal
deleted
inserted
replaced
21120:0cc12e6909e2 | 21121:35b4f1dc4c8d |
---|---|
2461 if (errno == EAGAIN) | 2461 if (errno == EAGAIN) |
2462 /* No worries */ | 2462 /* No worries */ |
2463 return; | 2463 return; |
2464 | 2464 |
2465 tmp = g_strdup_printf(_("Lost connection with server:\n%s"), | 2465 tmp = g_strdup_printf(_("Lost connection with server:\n%s"), |
2466 strerror(errno)); | 2466 g_strerror(errno)); |
2467 purple_connection_error(gc, tmp); | 2467 purple_connection_error(gc, tmp); |
2468 g_free(tmp); | 2468 g_free(tmp); |
2469 return; | 2469 return; |
2470 } else if (len == 0) { | 2470 } else if (len == 0) { |
2471 purple_connection_error(gc, _("Server closed the connection.")); | 2471 purple_connection_error(gc, _("Server closed the connection.")); |
2628 if (errno == EAGAIN) | 2628 if (errno == EAGAIN) |
2629 /* No worries */ | 2629 /* No worries */ |
2630 return; | 2630 return; |
2631 | 2631 |
2632 tmp = g_strdup_printf(_("Lost connection with server:\n%s"), | 2632 tmp = g_strdup_printf(_("Lost connection with server:\n%s"), |
2633 strerror(errno)); | 2633 g_strerror(errno)); |
2634 purple_connection_error(gc, tmp); | 2634 purple_connection_error(gc, tmp); |
2635 g_free(tmp); | 2635 g_free(tmp); |
2636 return; | 2636 return; |
2637 } else if (len == 0) { | 2637 } else if (len == 0) { |
2638 purple_connection_error(gc, _("Server closed the connection.")); | 2638 purple_connection_error(gc, _("Server closed the connection.")); |
2699 yd->auth = NULL; | 2699 yd->auth = NULL; |
2700 if (gc->inpa) | 2700 if (gc->inpa) |
2701 purple_input_remove(gc->inpa); | 2701 purple_input_remove(gc->inpa); |
2702 gc->inpa = 0; | 2702 gc->inpa = 0; |
2703 tmp = g_strdup_printf(_("Lost connection with %s:\n%s"), | 2703 tmp = g_strdup_printf(_("Lost connection with %s:\n%s"), |
2704 "login.yahoo.com:80", strerror(errno)); | 2704 "login.yahoo.com:80", g_strerror(errno)); |
2705 purple_connection_error(gc, tmp); | 2705 purple_connection_error(gc, tmp); |
2706 g_free(tmp); | 2706 g_free(tmp); |
2707 return; | 2707 return; |
2708 } | 2708 } |
2709 | 2709 |