Mercurial > pidgin.yaz
changeset 22516:8972581c2326
Improved some of the debug output from nat-pmp
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Fri, 21 Mar 2008 00:52:51 +0000 |
parents | 49deb72ffdc1 |
children | 63ffeb5c20a0 |
files | libpurple/nat-pmp.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/nat-pmp.c Thu Mar 20 08:42:15 2008 +0000 +++ b/libpurple/nat-pmp.c Fri Mar 21 00:52:51 2008 +0000 @@ -182,7 +182,7 @@ if (!(buf = malloc(needed))) { - purple_debug_warning("nat-pmp", "malloc\n"); + purple_debug_warning("nat-pmp", "Failed to malloc %i\n", needed); return NULL; } @@ -232,7 +232,7 @@ sin->sin_addr.s_addr = rti_sin->sin_addr.s_addr; memcpy(sin, rti_info[RTAX_GATEWAY], sizeof(struct sockaddr_in)); - purple_debug_info("nat-pmp", "found a default gateway\n"); + purple_debug_info("nat-pmp", "Found a default gateway\n"); found = TRUE; break; } @@ -455,7 +455,8 @@ { success = (resp->opcode == (req.opcode + 128)); if (!success) - purple_debug_info("nat-pmp", "The opcode for the response from the NAT device does not match the request opcode!\n"); + purple_debug_info("nat-pmp", "The opcode for the response from the NAT device (%i) does not match the request opcode (%i + 128 = %i)!\n", + resp->opcode, req.opcode, req.opcode + 128); } #ifdef PMP_DEBUG @@ -492,7 +493,8 @@ success = purple_pmp_create_map(((type == PURPLE_PMP_TYPE_UDP) ? PMP_MAP_OPCODE_UDP : PMP_MAP_OPCODE_TCP), privateport, 0, 0); if (!success) - purple_debug_warning("nat-pmp", "Failed to properly destroy mapping for %d!\n", privateport); + purple_debug_warning("nat-pmp", "Failed to properly destroy mapping for %s port %d!\n", + ((type == PURPLE_PMP_TYPE_UDP) ? "UDP" : "TCP"), privateport); return success; }