Fri, 31 Dec 2004 15:34:18 +0000
[gaim-migrate @ 11735]
Fix for bug 1027454: Blank "Unable to open socket" window if locale is not UTF-8
| plugins/gaim-remote/remote.c | file | annotate | diff | comparison | revisions |
--- 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);