# HG changeset patch
# User Mike Ruprecht <maiku@soc.pidgin.im>
# Date 1237458215 0
# Node ID 08e4ad2fcd631c98b81485bf7d18e4d3a679d410
# Parent  7fe896a5f4dbe47d585e375281ffff89ebd29a79
Have creator == NULL be a wildcard.

diff -r 7fe896a5f4db -r 08e4ad2fcd63 libpurple/protocols/jabber/jingle/session.c
--- a/libpurple/protocols/jabber/jingle/session.c	Thu Mar 19 09:54:02 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/session.c	Thu Mar 19 10:23:35 2009 +0000
@@ -500,11 +500,14 @@
 	for (; iter; iter = g_list_next(iter)) {
 		JingleContent *content = iter->data;
 		gchar *cname = jingle_content_get_name(content);
-		gchar *ccreator = jingle_content_get_creator(content);
-		gboolean result = (!strcmp(name, cname) && !strcmp(creator, ccreator));
+		gboolean result = !strcmp(name, cname);
+		g_free(cname);
 
-		g_free(cname);
-		g_free(ccreator);
+		if (creator != NULL) {
+			gchar *ccreator = jingle_content_get_creator(content);
+			result = (result && !strcmp(creator, ccreator));
+			g_free(ccreator);
+		}
 
 		if (result == TRUE)
 			return content;
@@ -519,11 +522,14 @@
 	for (; iter; iter = g_list_next(iter)) {
 		JingleContent *content = iter->data;
 		gchar *cname = jingle_content_get_name(content);
-		gchar *ccreator = jingle_content_get_creator(content);
-		gboolean result = (!strcmp(name, cname) && !strcmp(creator, ccreator));
+		gboolean result = !strcmp(name, cname);
+		g_free(cname);
 
-		g_free(cname);
-		g_free(ccreator);
+		if (creator != NULL) {
+			gchar *ccreator = jingle_content_get_creator(content);
+			result = (result && !strcmp(creator, ccreator));
+			g_free(ccreator);
+		}
 
 		if (result == TRUE)
 			return content;