Mercurial > pidgin
comparison libpurple/win32/libc_interface.c @ 30578:0accc8adb18a
merge of '2f6318bd834113559a405ec68cdb178f2180b680'
and '64e02b98551e11e093e4649f1516f3aceaa321e2'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 26 Sep 2010 20:16:15 +0000 |
parents | 47ea27481972 |
children | e529d0b57a5f |
comparison
equal
deleted
inserted
replaced
30577:7b761c8601f7 | 30578:0accc8adb18a |
---|---|
315 /* string.h */ | 315 /* string.h */ |
316 char* wpurple_strerror(int errornum) { | 316 char* wpurple_strerror(int errornum) { |
317 if (errornum > WSABASEERR) { | 317 if (errornum > WSABASEERR) { |
318 switch(errornum) { | 318 switch(errornum) { |
319 case WSAECONNABORTED: /* 10053 */ | 319 case WSAECONNABORTED: /* 10053 */ |
320 g_snprintf(errbuf, sizeof(errbuf), _("Connection interrupted by other software on your computer.")); | 320 g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection interrupted by other software on your computer.")); |
321 break; | 321 break; |
322 case WSAECONNRESET: /* 10054 */ | 322 case WSAECONNRESET: /* 10054 */ |
323 g_snprintf(errbuf, sizeof(errbuf), _("Remote host closed connection.")); | 323 g_snprintf(errbuf, sizeof(errbuf), "%s", _("Remote host closed connection.")); |
324 break; | 324 break; |
325 case WSAETIMEDOUT: /* 10060 */ | 325 case WSAETIMEDOUT: /* 10060 */ |
326 g_snprintf(errbuf, sizeof(errbuf), _("Connection timed out.")); | 326 g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection timed out.")); |
327 break; | 327 break; |
328 case WSAECONNREFUSED: /* 10061 */ | 328 case WSAECONNREFUSED: /* 10061 */ |
329 g_snprintf(errbuf, sizeof(errbuf), _("Connection refused.")); | 329 g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection refused.")); |
330 break; | 330 break; |
331 case WSAEADDRINUSE: /* 10048 */ | 331 case WSAEADDRINUSE: /* 10048 */ |
332 g_snprintf(errbuf, sizeof(errbuf), _("Address already in use.")); | 332 g_snprintf(errbuf, sizeof(errbuf), "%s", _("Address already in use.")); |
333 break; | 333 break; |
334 default: | 334 default: |
335 g_snprintf(errbuf, sizeof(errbuf), "Windows socket error #%d", errornum); | 335 g_snprintf(errbuf, sizeof(errbuf), "Windows socket error #%d", errornum); |
336 } | 336 } |
337 } else { | 337 } else { |
338 const char *tmp = g_strerror(errornum); | 338 const char *tmp = g_strerror(errornum); |
339 g_snprintf(errbuf, sizeof(errbuf), tmp); | 339 g_snprintf(errbuf, sizeof(errbuf), "%s", tmp); |
340 } | 340 } |
341 return errbuf; | 341 return errbuf; |
342 } | 342 } |
343 | 343 |
344 /* unistd.h */ | 344 /* unistd.h */ |