Mercurial > pidgin.yaz
changeset 28389:ed30bc20442c
jabber: Simplify; js is the callback data and can't be NULL.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 21 Aug 2009 20:47:47 +0000 |
parents | 76c0969e3ea7 |
children | 3a6b755da669 |
files | libpurple/protocols/jabber/google.c |
diffstat | 1 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c Fri Aug 21 20:45:47 2009 +0000 +++ b/libpurple/protocols/jabber/google.c Fri Aug 21 20:47:47 2009 +0000 @@ -1335,18 +1335,16 @@ port = ntohs(((struct sockaddr_in *) addr)->sin_port); } - if (js) { - if (js->stun_ip) { - g_free(js->stun_ip); - } - js->stun_ip = g_strdup(dst); - purple_debug_info("jabber", "set Google STUN IP address: %s\n", dst); - js->stun_port = port; - purple_debug_info("jabber", "set Google STUN port: %d\n", port); - purple_debug_info("jabber", "set Google STUN port: %d\n", port); - /* unmark ongoing query */ - js->stun_query = NULL; - } + if (js->stun_ip) + g_free(js->stun_ip); + js->stun_ip = g_strdup(dst); + js->stun_port = port; + + purple_debug_info("jabber", "set Google STUN IP/port address: " + "%s:%d\n", dst, port); + + /* unmark ongoing query */ + js->stun_query = NULL; } while (hosts != NULL) {