Mercurial > pidgin
diff libpurple/protocols/jabber/jingle/jingle.c @ 26010:db517c55c508
Make it compile in Windows with the equivalent of --disable-vv.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Fri, 09 Jan 2009 00:47:06 +0000 |
parents | 59188d904773 |
children | 88f183f7dfc7 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/jingle.c Thu Jan 08 08:26:36 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/jingle.c Fri Jan 09 00:47:06 2009 +0000 @@ -19,7 +19,8 @@ * */ -#include "config.h" +#include "internal.h" + #include "content.h" #include "debug.h" #include "jingle.h" @@ -423,15 +424,17 @@ } } +static void +jingle_terminate_sessions_gh(gpointer key, gpointer value, gpointer user_data) +{ + g_object_unref(value); +} + void jingle_terminate_sessions(JabberStream *js) { - GList *values = js->sessions ? - g_hash_table_get_values(js->sessions) : NULL; - - for (; values; values = g_list_delete_link(values, values)) { - JingleSession *session = (JingleSession *)values->data; - g_object_unref(session); - } + if (js->sessions) + g_hash_table_foreach(js->sessions, + jingle_terminate_sessions_gh, NULL); }