Mercurial > pidgin
changeset 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)
line wrap: on
line diff
--- a/libpurple/buddyicon.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/buddyicon.c Sat Nov 03 17:52:28 2007 +0000 @@ -116,7 +116,7 @@ { purple_debug_error("buddyicon", "Unable to create directory %s: %s\n", - dirname, strerror(errno)); + dirname, g_strerror(errno)); } } @@ -125,7 +125,7 @@ if (!fwrite(purple_imgstore_get_data(img), purple_imgstore_get_size(img), 1, file)) { purple_debug_error("buddyicon", "Error writing %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); } else purple_debug_info("buddyicon", "Wrote cache file: %s\n", path); @@ -135,7 +135,7 @@ else { purple_debug_error("buddyicon", "Unable to create file %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); g_free(path); return; } @@ -163,7 +163,7 @@ if (g_unlink(path)) { purple_debug_error("buddyicon", "Failed to delete %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); } else { @@ -951,7 +951,7 @@ if (!fwrite(icon_data, icon_len, 1, file)) { purple_debug_error("buddyicon", "Error writing %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); } else purple_debug_info("buddyicon", "Wrote migrated cache file: %s\n", path); @@ -961,7 +961,7 @@ else { purple_debug_error("buddyicon", "Unable to create file %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); g_free(new_filename); g_free(path); @@ -1056,7 +1056,7 @@ { purple_debug_error("buddyicon", "Unable to create directory %s: %s\n", - dirname, strerror(errno)); + dirname, g_strerror(errno)); } } }
--- a/libpurple/core.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/core.c Sat Nov 03 17:52:28 2007 +0000 @@ -378,7 +378,7 @@ if (g_rename(path, new_name)) { purple_debug_error("core", "Error renaming %s to %s: %s. Please report this at http://developer.pidgin.im\n", - path, new_name, strerror(errno)); + path, new_name, g_strerror(errno)); g_free(new_name); return FALSE; } @@ -391,7 +391,7 @@ if (symlink(new_name, old_name)) { purple_debug_warning("core", "Error symlinking %s to %s: %s. Please report this at http://developer.pidgin.im\n", - old_name, new_name, strerror(errno)); + old_name, new_name, g_strerror(errno)); } g_free(old_name); g_free(new_name); @@ -447,7 +447,7 @@ if (g_mkdir(user_dir, S_IRUSR | S_IWUSR | S_IXUSR) == -1) { purple_debug_error("core", "Error creating directory %s: %s. Please report this at http://developer.pidgin.im\n", - user_dir, strerror(errno)); + user_dir, g_strerror(errno)); g_free(status_file); g_free(old_user_dir); return FALSE; @@ -459,7 +459,7 @@ if (!(fp = g_fopen(status_file, "w"))) { purple_debug_error("core", "Error opening file %s for writing: %s. Please report this at http://developer.pidgin.im\n", - status_file, strerror(errno)); + status_file, g_strerror(errno)); g_free(status_file); g_free(old_user_dir); return FALSE; @@ -517,7 +517,7 @@ { char *name_utf8 = g_filename_to_utf8(name, -1, NULL, NULL, NULL); purple_debug_error("core", "Error reading symlink %s: %s. Please report this at http://developer.pidgin.im\n", - name_utf8, strerror(errno)); + name_utf8, g_strerror(errno)); g_free(name_utf8); g_free(name); g_dir_close(dir); @@ -555,7 +555,7 @@ if (symlink(link, logs_dir)) { purple_debug_error("core", "Error symlinking %s to %s: %s. Please report this at http://developer.pidgin.im\n", - logs_dir, link, strerror(errno)); + logs_dir, link, g_strerror(errno)); g_free(link); g_free(name); g_free(logs_dir); @@ -612,7 +612,7 @@ if (g_mkdir(new_icons_dir, S_IRUSR | S_IWUSR | S_IXUSR) == -1) { purple_debug_error("core", "Error creating directory %s: %s. Please report this at http://developer.pidgin.im\n", - new_icons_dir, strerror(errno)); + new_icons_dir, g_strerror(errno)); g_free(new_icons_dir); g_dir_close(icons_dir); g_free(name); @@ -675,7 +675,7 @@ if (!(fp = g_fopen(name, "rb"))) { purple_debug_error("core", "Error opening file %s for reading: %s. Please report this at http://developer.pidgin.im\n", - name, strerror(errno)); + name, g_strerror(errno)); g_free(name); g_dir_close(dir); g_free(status_file); @@ -687,7 +687,7 @@ if (!(new_file = g_fopen(new_name, "wb"))) { purple_debug_error("core", "Error opening file %s for writing: %s. Please report this at http://developer.pidgin.im\n", - new_name, strerror(errno)); + new_name, g_strerror(errno)); fclose(fp); g_free(new_name); g_free(name); @@ -706,7 +706,7 @@ if (size != sizeof(buf) && !feof(fp)) { purple_debug_error("core", "Error reading %s: %s. Please report this at http://developer.pidgin.im\n", - name, strerror(errno)); + name, g_strerror(errno)); fclose(new_file); fclose(fp); g_free(new_name); @@ -720,7 +720,7 @@ if (!fwrite(buf, size, 1, new_file) && ferror(new_file) != 0) { purple_debug_error("core", "Error writing %s: %s. Please report this at http://developer.pidgin.im\n", - new_name, strerror(errno)); + new_name, g_strerror(errno)); fclose(new_file); fclose(fp); g_free(new_name); @@ -735,12 +735,12 @@ if (fclose(new_file)) { purple_debug_error("core", "Error writing: %s: %s. Please report this at http://developer.pidgin.im\n", - new_name, strerror(errno)); + new_name, g_strerror(errno)); } if (fclose(fp)) { purple_debug_warning("core", "Error closing %s: %s\n", - name, strerror(errno)); + name, g_strerror(errno)); } g_free(new_name); } @@ -754,7 +754,7 @@ if (g_unlink(status_file)) { purple_debug_error("core", "Error unlinking file %s: %s. Please report this at http://developer.pidgin.im\n", - status_file, strerror(errno)); + status_file, g_strerror(errno)); g_free(status_file); return FALSE; }
--- a/libpurple/desktopitem.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/desktopitem.c Sat Nov 03 17:52:28 2007 +0000 @@ -1155,7 +1155,7 @@ dfile = g_fopen(filename, "r"); if (!dfile) { - printf ("Can't open %s: %s", filename, strerror(errno)); + printf ("Can't open %s: %s", filename, g_strerror(errno)); return NULL; }
--- a/libpurple/dnsquery.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/dnsquery.c Sat Nov 03 17:52:28 2007 +0000 @@ -346,7 +346,7 @@ /* Create pipes for communicating with the child process */ if (pipe(child_out) || pipe(child_in)) { purple_debug_error("dns", - "Could not create pipes: %s\n", strerror(errno)); + "Could not create pipes: %s\n", g_strerror(errno)); return NULL; } @@ -374,7 +374,7 @@ if (resolver->dns_pid == -1) { purple_debug_error("dns", "Could not create child process for DNS: %s\n", - strerror(errno)); + g_strerror(errno)); purple_dnsquery_resolver_destroy(resolver); return NULL; } @@ -416,7 +416,7 @@ return FALSE; } else if (pid < 0) { purple_debug_warning("dns", "Wait for DNS child %d failed: %s\n", - resolver->dns_pid, strerror(errno)); + resolver->dns_pid, g_strerror(errno)); purple_dnsquery_resolver_destroy(resolver); return FALSE; } @@ -430,7 +430,7 @@ rc = write(resolver->fd_in, &dns_params, sizeof(dns_params)); if (rc < 0) { purple_debug_error("dns", "Unable to write to DNS child %d: %d\n", - resolver->dns_pid, strerror(errno)); + resolver->dns_pid, g_strerror(errno)); purple_dnsquery_resolver_destroy(resolver); return FALSE; } @@ -571,7 +571,7 @@ purple_dnsquery_resolved(query_data, hosts); } else if (rc == -1) { - g_snprintf(message, sizeof(message), _("Error reading from resolver process:\n%s"), strerror(errno)); + g_snprintf(message, sizeof(message), _("Error reading from resolver process:\n%s"), g_strerror(errno)); purple_dnsquery_failed(query_data, message); } else if (rc == 0) {
--- a/libpurple/ft.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/ft.c Sat Nov 03 17:52:28 2007 +0000 @@ -207,15 +207,15 @@ switch(xfer_type) { case PURPLE_XFER_SEND: msg = g_strdup_printf(_("Error reading %s: \n%s.\n"), - utf8, strerror(err)); + utf8, g_strerror(err)); break; case PURPLE_XFER_RECEIVE: msg = g_strdup_printf(_("Error writing %s: \n%s.\n"), - utf8, strerror(err)); + utf8, g_strerror(err)); break; default: msg = g_strdup_printf(_("Error accessing %s: \n%s.\n"), - utf8, strerror(err)); + utf8, g_strerror(err)); break; } g_free(utf8);
--- a/libpurple/log.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/log.c Sat Nov 03 17:52:28 2007 +0000 @@ -756,7 +756,7 @@ if (!fwrite(image_data, image_byte_count, 1, image_file)) { purple_debug_error("log", "Error writing %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); fclose(image_file); /* Attempt to not leave half-written files around. */ @@ -771,7 +771,7 @@ else { purple_debug_error("log", "Unable to create file %s: %s\n", - path, strerror(errno)); + path, g_strerror(errno)); } } @@ -1108,7 +1108,7 @@ return TRUE; else if (ret == -1) { - purple_debug_error("log", "Failed to delete: %s - %s\n", data->path, strerror(errno)); + purple_debug_error("log", "Failed to delete: %s - %s\n", data->path, g_strerror(errno)); } else { @@ -1143,7 +1143,7 @@ g_free(dirname); return TRUE; } - purple_debug_info("log", "access(%s) failed: %s\n", dirname, strerror(errno)); + purple_debug_info("log", "access(%s) failed: %s\n", dirname, g_strerror(errno)); g_free(dirname); #else /* Unless and until someone writes equivalent win32 code, @@ -1638,7 +1638,7 @@ if (!(index = g_fopen(pathstr, "rb"))) { purple_debug_error("log", "Failed to open index file \"%s\" for reading: %s\n", - pathstr, strerror(errno)); + pathstr, g_strerror(errno)); /* Fall through so that we'll parse the log file. */ } @@ -1675,7 +1675,7 @@ if (!(file = g_fopen(purple_stringref_value(pathref), "rb"))) { purple_debug_error("log", "Failed to open log file \"%s\" for reading: %s\n", - purple_stringref_value(pathref), strerror(errno)); + purple_stringref_value(pathref), g_strerror(errno)); purple_stringref_unref(pathref); g_free(pathstr); return NULL; @@ -1684,7 +1684,7 @@ index_tmp = g_strdup_printf("%s.XXXXXX", pathstr); if ((index_fd = g_mkstemp(index_tmp)) == -1) { purple_debug_error("log", "Failed to open index temp file: %s\n", - strerror(errno)); + g_strerror(errno)); g_free(pathstr); g_free(index_tmp); index = NULL; @@ -1692,7 +1692,7 @@ if ((index = fdopen(index_fd, "wb")) == NULL) { purple_debug_error("log", "Failed to fdopen() index temp file: %s\n", - strerror(errno)); + g_strerror(errno)); close(index_fd); if (index_tmp != NULL) { @@ -1828,7 +1828,7 @@ if (g_rename(index_tmp, pathstr)) { purple_debug_warning("log", "Failed to rename index temp file \"%s\" to \"%s\": %s\n", - index_tmp, pathstr, strerror(errno)); + index_tmp, pathstr, g_strerror(errno)); g_unlink(index_tmp); g_free(index_tmp); }
--- a/libpurple/nat-pmp.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/nat-pmp.c Sat Nov 03 17:52:28 2007 +0000 @@ -312,7 +312,7 @@ if (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) < 0) { - purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP public IP request! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP public IP request! (%s)\n", g_strerror(errno)); g_free(gateway); pmp_info.status = PURPLE_PMP_STATUS_UNABLE_TO_DISCOVER; return NULL; @@ -320,7 +320,7 @@ if (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) < 0) { - purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", g_strerror(errno)); g_free(gateway); pmp_info.status = PURPLE_PMP_STATUS_UNABLE_TO_DISCOVER; return NULL; @@ -332,7 +332,7 @@ { if (errno != EAGAIN) { - purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", g_strerror(errno)); g_free(gateway); pmp_info.status = PURPLE_PMP_STATUS_UNABLE_TO_DISCOVER; return NULL; @@ -432,13 +432,13 @@ /* TODO: Non-blocking! */ success = (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) >= 0); if (!success) - purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP mapping request! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP mapping request! (%s)\n", g_strerror(errno)); if (success) { success = (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) >= 0); if (!success) - purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", g_strerror(errno)); } if (success) @@ -448,7 +448,7 @@ success = ((recvfrom(sendfd, resp, sizeof(PurplePmpMapResponse), 0, NULL, NULL) >= 0) || (errno == EAGAIN)); if (!success) - purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno)); + purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", g_strerror(errno)); } if (success)
--- a/libpurple/network.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/network.c Sat Nov 03 17:52:28 2007 +0000 @@ -285,7 +285,7 @@ #ifndef _WIN32 purple_debug_warning("network", "getaddrinfo: %s\n", gai_strerror(errnum)); if (errnum == EAI_SYSTEM) - purple_debug_warning("network", "getaddrinfo: system error: %s\n", strerror(errno)); + purple_debug_warning("network", "getaddrinfo: system error: %s\n", g_strerror(errno)); #else purple_debug_warning("network", "getaddrinfo: Error Code = %d\n", errnum); #endif @@ -302,7 +302,7 @@ if (listenfd < 0) continue; if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0) - purple_debug_warning("network", "setsockopt: %s\n", strerror(errno)); + purple_debug_warning("network", "setsockopt: %s\n", g_strerror(errno)); if (bind(listenfd, next->ai_addr, next->ai_addrlen) == 0) break; /* success */ /* XXX - It is unclear to me (datallah) whether we need to be @@ -318,26 +318,26 @@ struct sockaddr_in sockin; if ((listenfd = socket(AF_INET, socket_type, 0)) < 0) { - purple_debug_warning("network", "socket: %s\n", strerror(errno)); + purple_debug_warning("network", "socket: %s\n", g_strerror(errno)); return NULL; } if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) != 0) - purple_debug_warning("network", "setsockopt: %s\n", strerror(errno)); + purple_debug_warning("network", "setsockopt: %s\n", g_strerror(errno)); memset(&sockin, 0, sizeof(struct sockaddr_in)); sockin.sin_family = PF_INET; sockin.sin_port = htons(port); if (bind(listenfd, (struct sockaddr *)&sockin, sizeof(struct sockaddr_in)) != 0) { - purple_debug_warning("network", "bind: %s\n", strerror(errno)); + purple_debug_warning("network", "bind: %s\n", g_strerror(errno)); close(listenfd); return NULL; } #endif if (socket_type == SOCK_STREAM && listen(listenfd, 4) != 0) { - purple_debug_warning("network", "listen: %s\n", strerror(errno)); + purple_debug_warning("network", "listen: %s\n", g_strerror(errno)); close(listenfd); return NULL; } @@ -426,7 +426,7 @@ len = sizeof(addr); if (getsockname(fd, (struct sockaddr *) &addr, &len) == -1) { - purple_debug_warning("network", "getsockname: %s\n", strerror(errno)); + purple_debug_warning("network", "getsockname: %s\n", g_strerror(errno)); return 0; }
--- a/libpurple/plugins/tcl/tcl.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/plugins/tcl/tcl.c Sat Nov 03 17:52:28 2007 +0000 @@ -198,7 +198,7 @@ } if (ferror(fp)) { - purple_debug(PURPLE_DEBUG_ERROR, "tcl", "error reading %s (%s)\n", plugin->path, strerror(errno)); + purple_debug(PURPLE_DEBUG_ERROR, "tcl", "error reading %s (%s)\n", plugin->path, g_strerror(errno)); g_free(buf); fclose(fp); return FALSE;
--- a/libpurple/protocols/bonjour/bonjour.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Sat Nov 03 17:52:28 2007 +0000 @@ -648,7 +648,7 @@ /* TODO: Avoid 'localhost,' if possible */ if (gethostname(hostname, 255) != 0) { purple_debug_warning("bonjour", "Error when getting host name: %s. Using \"localhost.\"\n", - strerror(errno)); + g_strerror(errno)); strcpy(hostname, "localhost"); } default_hostname = g_strdup(hostname);
--- a/libpurple/protocols/bonjour/jabber.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Sat Nov 03 17:52:28 2007 +0000 @@ -244,7 +244,7 @@ return; else if (ret <= 0) { PurpleConversation *conv; - const char *error = strerror(errno); + const char *error = g_strerror(errno); purple_debug_error("bonjour", "Error sending message to buddy %s error: %s\n", purple_buddy_get_name(pb), error ? error : "(null)"); @@ -287,7 +287,7 @@ ret = 0; else if (ret <= 0) { PurpleConversation *conv; - const char *error = strerror(errno); + const char *error = g_strerror(errno); purple_debug_error("bonjour", "Error sending message to buddy %s error: %s\n", purple_buddy_get_name(pb), error ? error : "(null)"); @@ -337,7 +337,7 @@ if (errno != EAGAIN) { BonjourBuddy *bb = pb->proto_data; - purple_debug_warning("bonjour", "receive error: %s\n", strerror(errno)); + purple_debug_warning("bonjour", "receive error: %s\n", g_strerror(errno)); bonjour_jabber_close_conversation(bb->conversation); bb->conversation = NULL; @@ -427,7 +427,7 @@ if (ret == -1 && errno == EAGAIN) return; else if (ret <= 0) { - const char *err = strerror(errno); + const char *err = g_strerror(errno); PurpleConversation *conv; purple_debug_error("bonjour", "Error starting stream with buddy %s at %s:%d error: %s\n", @@ -482,7 +482,7 @@ if (ret == -1 && errno == EAGAIN) ret = 0; else if (ret <= 0) { - const char *err = strerror(errno); + const char *err = g_strerror(errno); purple_debug_error("bonjour", "Error starting stream with buddy %s at %s:%d error: %s\n", purple_buddy_get_name(pb), bb->ip ? bb->ip : "(null)", bb->port_p2pj, err ? err : "(null)"); @@ -583,7 +583,7 @@ /* Open a listening socket for incoming conversations */ if ((data->socket = socket(PF_INET, SOCK_STREAM, 0)) < 0) { - purple_debug_error("bonjour", "Cannot open socket: %s\n", strerror(errno)); + purple_debug_error("bonjour", "Cannot open socket: %s\n", g_strerror(errno)); purple_connection_error(data->account->gc, _("Cannot open socket")); return -1; } @@ -591,7 +591,7 @@ /* Make the socket reusable */ if (setsockopt(data->socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) != 0) { - purple_debug_error("bonjour", "Error setting socket options: %s\n", strerror(errno)); + purple_debug_error("bonjour", "Error setting socket options: %s\n", g_strerror(errno)); purple_connection_error(data->account->gc, _("Error setting socket options")); return -1; } @@ -615,7 +615,7 @@ /* On no! We tried 10 ports and could not bind to ANY of them */ if (!bind_successful) { - purple_debug_error("bonjour", "Cannot bind socket: %s\n", strerror(errno)); + purple_debug_error("bonjour", "Cannot bind socket: %s\n", g_strerror(errno)); purple_connection_error(data->account->gc, _("Could not bind socket to port")); return -1; } @@ -623,7 +623,7 @@ /* Attempt to listen on the bound socket */ if (listen(data->socket, 10) != 0) { - purple_debug_error("bonjour", "Cannot listen on socket: %s\n", strerror(errno)); + purple_debug_error("bonjour", "Cannot listen on socket: %s\n", g_strerror(errno)); purple_connection_error(data->account->gc, _("Could not listen on socket")); return -1; } @@ -670,7 +670,7 @@ } if (!bonjour_jabber_stream_init(pb, source)) { - const char *err = strerror(errno); + const char *err = g_strerror(errno); PurpleConversation *conv; purple_debug_error("bonjour", "Error starting stream with buddy %s at %s:%d error: %s\n",
--- a/libpurple/protocols/irc/dcc_send.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/irc/dcc_send.c Sat Nov 03 17:52:28 2007 +0000 @@ -251,7 +251,7 @@ * to the nonblocking nature of the listening socket, so we'll * just try again next time */ /* Let's print an error message anyway */ - purple_debug_warning("irc", "accept: %s\n", strerror(errno)); + purple_debug_warning("irc", "accept: %s\n", g_strerror(errno)); return; }
--- a/libpurple/protocols/jabber/si.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/jabber/si.c Sat Nov 03 17:52:28 2007 +0000 @@ -536,7 +536,7 @@ if(acceptfd == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return; else if(acceptfd == -1) { - purple_debug_warning("jabber", "accept: %s\n", strerror(errno)); + purple_debug_warning("jabber", "accept: %s\n", g_strerror(errno)); return; }
--- a/libpurple/protocols/msn/notification.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Sat Nov 03 17:52:28 2007 +0000 @@ -1411,7 +1411,7 @@ { purple_debug_error("msn", "Error opening temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); } else { @@ -1460,7 +1460,7 @@ { purple_debug_error("msn", "Error closing temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); g_unlink(session->passport_info.file); g_free(session->passport_info.file);
--- a/libpurple/protocols/msn/servconn.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/msn/servconn.c Sat Nov 03 17:52:28 2007 +0000 @@ -402,7 +402,7 @@ default: purple_debug_error("msn", "servconn read error," "len: %d, errno: %d, error: %s\n", - len, errno, strerror(errno)); + len, errno, g_strerror(errno)); msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ); return;
--- a/libpurple/protocols/msn/soap.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/msn/soap.c Sat Nov 03 17:52:28 2007 +0000 @@ -274,7 +274,7 @@ default : purple_debug_error("MSN SOAP", "Read error!" "read len: %d, error = %s\n", - len, strerror(errno)); + len, g_strerror(errno)); purple_input_remove(soapconn->input_handler); //soapconn->input_handler = 0; g_free(soapconn->read_buf);
--- a/libpurple/protocols/msn/soap2.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/msn/soap2.c Sat Nov 03 17:52:28 2007 +0000 @@ -271,7 +271,7 @@ if (count < 0 && errno == EAGAIN) return; else if (count <= 0) { - purple_debug_info("soap", "read: %s\n", strerror(errno)); + purple_debug_info("soap", "read: %s\n", g_strerror(errno)); purple_ssl_close(conn->ssl); conn->ssl = NULL; msn_soap_connection_handle_next(conn);
--- a/libpurple/protocols/myspace/myspace.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sat Nov 03 17:52:28 2007 +0000 @@ -2353,7 +2353,7 @@ } else if (n < 0) { purple_debug_error("msim", "msim_input_cb: read error, ret=%d, " "error=%s, source=%d, fd=%d (%X))\n", - n, strerror(errno), source, session->fd, session->fd); + n, g_strerror(errno), source, session->fd, session->fd); purple_connection_error(gc, _("Read error")); return; } else if (n == 0) {
--- a/libpurple/protocols/oscar/flap_connection.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/oscar/flap_connection.c Sat Nov 03 17:52:28 2007 +0000 @@ -468,7 +468,7 @@ * @param error_message A brief error message that gives more detail * regarding the reason for the disconnecting. This should * be NULL for everything except OSCAR_DISCONNECT_LOST_CONNECTION, - * in which case it should contain the value of strerror(errno), + * in which case it should contain the value of g_strerror(errno), * and OSCAR_DISCONNECT_COULD_NOT_CONNECT, in which case it * should contain the error_message passed back from the call * to purple_proxy_connect(). @@ -812,7 +812,7 @@ /* Error! */ flap_connection_schedule_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); break; } @@ -873,7 +873,7 @@ /* Error! */ flap_connection_schedule_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); break; } @@ -924,7 +924,7 @@ close(conn->fd); conn->fd = -1; flap_connection_schedule_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); return; }
--- a/libpurple/protocols/oscar/odc.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/oscar/odc.c Sat Nov 03 17:52:28 2007 +0000 @@ -456,7 +456,7 @@ return; peer_connection_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); return; }
--- a/libpurple/protocols/oscar/oft.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/oscar/oft.c Sat Nov 03 17:52:28 2007 +0000 @@ -212,7 +212,7 @@ if (checksum_data->file == NULL) { purple_debug_error("oscar", "Unable to open %s for checksumming: %s\n", - purple_xfer_get_local_filename(xfer), strerror(errno)); + purple_xfer_get_local_filename(xfer), g_strerror(errno)); callback(checksum_data); g_free(checksum_data); }
--- a/libpurple/protocols/oscar/peer.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/oscar/peer.c Sat Nov 03 17:52:28 2007 +0000 @@ -317,7 +317,7 @@ return; peer_connection_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); return; } @@ -367,7 +367,7 @@ return; peer_connection_destroy(conn, - OSCAR_DISCONNECT_LOST_CONNECTION, strerror(errno)); + OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); return; }
--- a/libpurple/protocols/qq/qq_proxy.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/qq/qq_proxy.c Sat Nov 03 17:52:28 2007 +0000 @@ -237,7 +237,7 @@ close(source); purple_input_remove(phb->inpa); - purple_debug_error("proxy", "getsockopt SO_ERROR check: %s\n", strerror(error)); + purple_debug_error("proxy", "getsockopt SO_ERROR check: %s\n", g_strerror(error)); phb->func(phb->data, -1, _("Unable to connect")); return; @@ -265,7 +265,7 @@ if (fd < 0) { purple_debug(PURPLE_DEBUG_ERROR, "QQ Redirect", - "Unable to create socket: %s\n", strerror(errno)); + "Unable to create socket: %s\n", g_strerror(errno)); return -1; } @@ -297,7 +297,7 @@ purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Connect in asynchronous mode.\n"); phb->inpa = purple_input_add(fd, PURPLE_INPUT_WRITE, no_one_calls, phb); } else { - purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Connection failed: %d\n", strerror(errno)); + purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Connection failed: %d\n", g_strerror(errno)); close(fd); return -1; } /* if errno */ @@ -497,7 +497,7 @@ ret = send(qd->fd, data, len, 0); } if (ret == -1) - purple_connection_error(qd->gc, strerror(errno)); + purple_connection_error(qd->gc, g_strerror(errno)); return ret; }
--- a/libpurple/protocols/qq/udp_proxy_s5.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/qq/udp_proxy_s5.c Sat Nov 03 17:52:28 2007 +0000 @@ -74,7 +74,7 @@ memcpy(&sin.sin_port, buf + 8, 2); if (connect(phb->udpsock, (struct sockaddr *) &sin, sizeof(struct sockaddr_in)) < 0) { - purple_debug(PURPLE_DEBUG_INFO, "s5_canread_again", "connect failed: %s\n", strerror(errno)); + purple_debug(PURPLE_DEBUG_INFO, "s5_canread_again", "connect failed: %s\n", g_strerror(errno)); close(phb->udpsock); close(source); g_free(phb->host); @@ -120,7 +120,7 @@ ctllen = sizeof(ctlsin); if (getsockname(source, (struct sockaddr *) &ctlsin, &ctllen) < 0) { - purple_debug(PURPLE_DEBUG_INFO, "QQ", "getsockname: %s\n", strerror(errno)); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "getsockname: %s\n", g_strerror(errno)); close(source); g_free(phb->host); g_free(phb); @@ -300,7 +300,7 @@ len = sizeof(error); if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { - purple_debug(PURPLE_DEBUG_INFO, "getsockopt", "%s\n", strerror(errno)); + purple_debug(PURPLE_DEBUG_INFO, "getsockopt", "%s\n", g_strerror(errno)); close(source); if (phb->account == NULL || purple_account_get_connection(phb->account) != NULL) { @@ -329,7 +329,7 @@ } if (write(source, buf, i) < i) { - purple_debug(PURPLE_DEBUG_INFO, "write", "%s\n", strerror(errno)); + purple_debug(PURPLE_DEBUG_INFO, "write", "%s\n", g_strerror(errno)); purple_debug(PURPLE_DEBUG_ERROR, "socks5 proxy", "Unable to write\n"); close(source);
--- a/libpurple/protocols/sametime/sametime.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sat Nov 03 17:52:28 2007 +0000 @@ -1702,7 +1702,7 @@ purple_connection_error(pd->gc, _("Connection reset")); } else if(ret < 0) { - char *msg = strerror(err); + char *msg = g_strerror(err); DEBUG_INFO("error in read callback: %s\n", msg); @@ -2167,7 +2167,7 @@ } else { int err = errno; DEBUG_WARN("problem reading from file %s: %s\n", - NSTR(mwFileTransfer_getFileName(ft)), strerror(err)); + NSTR(mwFileTransfer_getFileName(ft)), g_strerror(err)); mwFileTransfer_cancel(ft); } @@ -5009,7 +5009,7 @@ fp = g_fopen(filename, "rb"); if(! fp) { char *msg = g_strdup_printf(_("Error reading file %s: \n%s\n"), - filename, strerror(errno)); + filename, g_strerror(errno)); purple_xfer_error(purple_xfer_get_type(xfer), acct, xfer->who, msg); g_free(msg); return;
--- a/libpurple/protocols/silc/util.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/silc/util.c Sat Nov 03 17:52:28 2007 +0000 @@ -79,7 +79,7 @@ pw = getpwuid(getuid()); if (!pw) { - purple_debug_error("silc", "silc: %s\n", strerror(errno)); + purple_debug_error("silc", "silc: %s\n", g_strerror(errno)); return FALSE; } @@ -108,7 +108,7 @@ return FALSE; } } else { - purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", filename, strerror(errno)); + purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", filename, g_strerror(errno)); return FALSE; } } else { @@ -140,7 +140,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - servfilename, strerror(errno)); + servfilename, g_strerror(errno)); return FALSE; } } @@ -163,7 +163,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - clientfilename, strerror(errno)); + clientfilename, g_strerror(errno)); return FALSE; } } @@ -186,7 +186,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - friendsfilename, strerror(errno)); + friendsfilename, g_strerror(errno)); return FALSE; } } @@ -218,12 +218,12 @@ if ((g_stat(file_public_key, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' public key, error: %s\n", - file_public_key, strerror(errno)); + file_public_key, g_strerror(errno)); return FALSE; } } else { purple_debug_error("silc", "Couldn't stat '%s' public key, error: %s\n", - file_public_key, strerror(errno)); + file_public_key, g_strerror(errno)); return FALSE; } } @@ -239,7 +239,7 @@ if ((fd = g_open(file_private_key, O_RDONLY, 0)) != -1) { if ((fstat(fd, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); close(fd); return FALSE; } @@ -261,7 +261,7 @@ if ((fd = g_open(file_private_key, O_RDONLY, 0)) != -1) { if ((fstat(fd, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); close(fd); return FALSE; } @@ -270,12 +270,12 @@ * will set the permissions */ else if ((g_stat(file_private_key, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); return FALSE; } } else { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); return FALSE; } }
--- a/libpurple/protocols/silc10/silc.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/silc10/silc.c Sat Nov 03 17:52:28 2007 +0000 @@ -331,7 +331,7 @@ (char *)purple_account_get_string(account, "private-key", prd), (gc->password == NULL) ? "" : gc->password, &client->pkcs, &client->public_key, &client->private_key)) { - g_snprintf(pkd, sizeof(pkd), _("Could not load SILC key pair: %s"), strerror(errno)); + g_snprintf(pkd, sizeof(pkd), _("Could not load SILC key pair: %s"), g_strerror(errno)); purple_connection_error(gc, pkd); return; }
--- a/libpurple/protocols/silc10/util.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/silc10/util.c Sat Nov 03 17:52:28 2007 +0000 @@ -79,7 +79,7 @@ pw = getpwuid(getuid()); if (!pw) { - purple_debug_error("silc", "silc: %s\n", strerror(errno)); + purple_debug_error("silc", "silc: %s\n", g_strerror(errno)); return FALSE; } @@ -108,7 +108,7 @@ return FALSE; } } else { - purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", filename, strerror(errno)); + purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", filename, g_strerror(errno)); return FALSE; } } else { @@ -140,7 +140,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - servfilename, strerror(errno)); + servfilename, g_strerror(errno)); return FALSE; } } @@ -163,7 +163,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - clientfilename, strerror(errno)); + clientfilename, g_strerror(errno)); return FALSE; } } @@ -186,7 +186,7 @@ } } else { purple_debug_error("silc", "Couldn't stat '%s' directory, error: %s\n", - friendsfilename, strerror(errno)); + friendsfilename, g_strerror(errno)); return FALSE; } } @@ -216,12 +216,12 @@ if ((g_stat(file_public_key, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' public key, error: %s\n", - file_public_key, strerror(errno)); + file_public_key, g_strerror(errno)); return FALSE; } } else { purple_debug_error("silc", "Couldn't stat '%s' public key, error: %s\n", - file_public_key, strerror(errno)); + file_public_key, g_strerror(errno)); return FALSE; } } @@ -237,7 +237,7 @@ if ((fd = g_open(file_private_key, O_RDONLY, 0)) != -1) { if ((fstat(fd, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); close(fd); return FALSE; } @@ -257,7 +257,7 @@ if ((fd = g_open(file_private_key, O_RDONLY, 0)) != -1) { if ((fstat(fd, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); close(fd); return FALSE; } @@ -266,12 +266,12 @@ * will set the permissions */ else if ((g_stat(file_private_key, &st)) == -1) { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); return FALSE; } } else { purple_debug_error("silc", "Couldn't stat '%s' private key, error: %s\n", - file_private_key, strerror(errno)); + file_private_key, g_strerror(errno)); return FALSE; } }
--- a/libpurple/protocols/toc/toc.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/toc/toc.c Sat Nov 03 17:52:28 2007 +0000 @@ -1795,7 +1795,7 @@ ft->file = g_fopen(ft->filename, "w"); if (!ft->file) { buf = g_strdup_printf(_("Could not open %s for writing!"), ft->filename); - purple_notify_error(ft->gc, NULL, buf, strerror(errno)); + purple_notify_error(ft->gc, NULL, buf, g_strerror(errno)); g_free(buf); purple_input_remove(ft->inpa); close(source); @@ -1812,7 +1812,7 @@ if (!ft->file) { buf = g_strdup_printf("Could not open %s/%s for writing!", ft->filename, ft->hdr.name); - purple_notify_error(ft->gc, NULL, buf, strerror(errno)); + purple_notify_error(ft->gc, NULL, buf, g_strerror(errno)); g_free(buf); purple_input_remove(ft->inpa); close(source);
--- a/libpurple/protocols/yahoo/yahoo.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Nov 03 17:52:28 2007 +0000 @@ -2463,7 +2463,7 @@ return; tmp = g_strdup_printf(_("Lost connection with server:\n%s"), - strerror(errno)); + g_strerror(errno)); purple_connection_error(gc, tmp); g_free(tmp); return; @@ -2630,7 +2630,7 @@ return; tmp = g_strdup_printf(_("Lost connection with server:\n%s"), - strerror(errno)); + g_strerror(errno)); purple_connection_error(gc, tmp); g_free(tmp); return; @@ -2701,7 +2701,7 @@ purple_input_remove(gc->inpa); gc->inpa = 0; tmp = g_strdup_printf(_("Lost connection with %s:\n%s"), - "login.yahoo.com:80", strerror(errno)); + "login.yahoo.com:80", g_strerror(errno)); purple_connection_error(gc, tmp); g_free(tmp); return;
--- a/libpurple/protocols/yahoo/ycht.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/protocols/yahoo/ycht.c Sat Nov 03 17:52:28 2007 +0000 @@ -473,7 +473,7 @@ return; tmp = g_strdup_printf(_("Lost connection with server\n%s"), - strerror(errno)); + g_strerror(errno)); ycht_connection_error(ycht, tmp); g_free(tmp); return;
--- a/libpurple/proxy.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/proxy.c Sat Nov 03 17:52:28 2007 +0000 @@ -429,9 +429,9 @@ if (ret != 0) error = errno; purple_debug_info("proxy", "Error connecting to %s:%d (%s).\n", - connect_data->host, connect_data->port, strerror(error)); + connect_data->host, connect_data->port, g_strerror(error)); - purple_proxy_connect_data_disconnect(connect_data, strerror(error)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(error)); return; } @@ -458,7 +458,7 @@ if (connect_data->fd < 0) { purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Unable to create socket:\n%s"), strerror(errno)); + _("Unable to create socket:\n%s"), g_strerror(errno)); return; } @@ -478,7 +478,7 @@ } else { - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); } } else @@ -496,7 +496,7 @@ { if (ret != 0) error = errno; - purple_proxy_connect_data_disconnect(connect_data, strerror(error)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(error)); return; } @@ -534,7 +534,7 @@ return; /* Error! */ - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); return; } if (ret < request_len) { @@ -593,7 +593,7 @@ /* Error! */ purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Lost connection with server:\n%s"), strerror(errno)); + _("Lost connection with server:\n%s"), g_strerror(errno)); return; } @@ -832,7 +832,7 @@ { if (ret != 0) error = errno; - purple_proxy_connect_data_disconnect(connect_data, strerror(error)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(error)); return; } @@ -899,7 +899,7 @@ if (connect_data->fd < 0) { purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Unable to create socket:\n%s"), strerror(errno)); + _("Unable to create socket:\n%s"), g_strerror(errno)); return; } @@ -937,7 +937,7 @@ } else { - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); } } else @@ -978,7 +978,7 @@ } } - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); } static void @@ -1003,7 +1003,7 @@ { if (ret != 0) error = errno; - purple_proxy_connect_data_disconnect(connect_data, strerror(error)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(error)); return; } @@ -1058,7 +1058,7 @@ if (connect_data->fd < 0) { purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Unable to create socket:\n%s"), strerror(errno)); + _("Unable to create socket:\n%s"), g_strerror(errno)); return; } @@ -1078,7 +1078,7 @@ } else { - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); } } else @@ -1138,7 +1138,7 @@ /* Error! */ purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Lost connection with server:\n%s"), strerror(errno)); + _("Lost connection with server:\n%s"), g_strerror(errno)); return; } @@ -1247,7 +1247,7 @@ /* Error! */ purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Lost connection with server:\n%s"), strerror(errno)); + _("Lost connection with server:\n%s"), g_strerror(errno)); return; } @@ -1347,7 +1347,7 @@ /* Error! */ purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Lost connection with server:\n%s"), strerror(errno)); + _("Lost connection with server:\n%s"), g_strerror(errno)); return; } @@ -1475,7 +1475,7 @@ /* Error! */ purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Lost connection with server:\n%s"), strerror(errno)); + _("Lost connection with server:\n%s"), g_strerror(errno)); return; } @@ -1584,7 +1584,7 @@ { if (ret != 0) error = errno; - purple_proxy_connect_data_disconnect(connect_data, strerror(error)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(error)); return; } @@ -1629,7 +1629,7 @@ if (connect_data->fd < 0) { purple_proxy_connect_data_disconnect_formatted(connect_data, - _("Unable to create socket:\n%s"), strerror(errno)); + _("Unable to create socket:\n%s"), g_strerror(errno)); return; } @@ -1649,7 +1649,7 @@ } else { - purple_proxy_connect_data_disconnect(connect_data, strerror(errno)); + purple_proxy_connect_data_disconnect(connect_data, g_strerror(errno)); } } else
--- a/libpurple/util.c Sat Nov 03 17:04:25 2007 +0000 +++ b/libpurple/util.c Sat Nov 03 17:52:28 2007 +0000 @@ -2505,7 +2505,7 @@ } if (g_mkdir(dir, mode) < 0) { - purple_debug_warning("build_dir", "mkdir: %s\n", strerror(errno)); + purple_debug_warning("build_dir", "mkdir: %s\n", g_strerror(errno)); g_strfreev(components); g_free(dir); return -1; @@ -2541,7 +2541,7 @@ if (g_mkdir(user_dir, S_IRUSR | S_IWUSR | S_IXUSR) == -1) { purple_debug_error("util", "Error creating directory %s: %s\n", - user_dir, strerror(errno)); + user_dir, g_strerror(errno)); return FALSE; } } @@ -2576,7 +2576,7 @@ { purple_debug_error("util", "Error removing old file " "%s: %s\n", - filename_temp, strerror(errno)); + filename_temp, g_strerror(errno)); } } @@ -2586,7 +2586,7 @@ { purple_debug_error("util", "Error opening file %s for " "writing: %s\n", - filename_temp, strerror(errno)); + filename_temp, g_strerror(errno)); g_free(filename_temp); return FALSE; } @@ -2599,7 +2599,7 @@ if (fclose(file) != 0) { purple_debug_error("util", "Error closing file %s: %s\n", - filename_temp, strerror(errno)); + filename_temp, g_strerror(errno)); g_free(filename_temp); return FALSE; } @@ -2631,7 +2631,7 @@ if (chmod(filename_temp, S_IRUSR | S_IWUSR) == -1) { purple_debug_error("util", "Error setting permissions of file %s: %s\n", - filename_temp, strerror(errno)); + filename_temp, g_strerror(errno)); } #endif @@ -2640,7 +2640,7 @@ { purple_debug_error("util", "Error renaming %s to %s: %s\n", filename_temp, filename_full, - strerror(errno)); + g_strerror(errno)); } g_free(filename_temp); @@ -3688,7 +3688,7 @@ if(new_data == NULL) { purple_debug_error("util", "Failed to allocate %u bytes: %s\n", - content_len, strerror(errno)); + content_len, g_strerror(errno)); purple_util_fetch_url_error(gfud, _("Unable to allocate enough memory to hold " "the contents from %s. The web server may " @@ -3726,7 +3726,7 @@ return; } else { purple_util_fetch_url_error(gfud, _("Error reading from %s: %s"), - gfud->website.address, strerror(errno)); + gfud->website.address, g_strerror(errno)); return; } } @@ -3757,7 +3757,7 @@ return; else if (len < 0) { purple_util_fetch_url_error(gfud, _("Error writing to %s: %s"), - gfud->website.address, strerror(errno)); + gfud->website.address, g_strerror(errno)); return; } gfud->request_written += len;