changeset 10462:f7b32dd67bdf

[gaim-migrate @ 11735] Fix for bug 1027454: Blank "Unable to open socket" window if locale is not UTF-8 committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 31 Dec 2004 15:34:18 +0000
parents e94802fe3eaf
children 9bed28273ec7
files plugins/gaim-remote/remote.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c	Fri Dec 31 14:02:10 2004 +0000
+++ b/plugins/gaim-remote/remote.c	Fri Dec 31 15:34:18 2004 +0000
@@ -745,12 +745,14 @@
 		if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1)
 			listen(fd, 100);
 		else {
+			char *tmp = g_locale_to_utf8(strerror(errno), -1, NULL, NULL, NULL);
 			*error = g_strdup_printf(_("Failed to assign %s to a socket:\n%s"),
-					   saddr.sun_path, strerror(errno));
+					   saddr.sun_path, tmp);
 			g_log(NULL, G_LOG_LEVEL_CRITICAL,
 			      "Failed to assign %s to a socket (Error: %s)",
 			      saddr.sun_path, strerror(errno));
 			umask(m);
+			g_free(tmp);
 			return -1;
 		}
 		umask(m);