[asterisk-commits] anthonyl: branch anthonyl/gtalk-bindaddr r45600 - /team/anthonyl/gtalk-bindad...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Oct 18 14:53:58 MST 2006


Author: anthonyl
Date: Wed Oct 18 16:53:57 2006
New Revision: 45600

URL: http://svn.digium.com/view/asterisk?rev=45600&view=rev
Log:
patch for 8156

Modified:
    team/anthonyl/gtalk-bindaddr/channels/chan_gtalk.c

Modified: team/anthonyl/gtalk-bindaddr/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/gtalk-bindaddr/channels/chan_gtalk.c?rev=45600&r1=45599&r2=45600&view=diff
==============================================================================
--- team/anthonyl/gtalk-bindaddr/channels/chan_gtalk.c (original)
+++ team/anthonyl/gtalk-bindaddr/channels/chan_gtalk.c Wed Oct 18 16:53:57 2006
@@ -838,8 +838,14 @@
 			buddy = ASTOBJ_CONTAINER_FIND(&client->connection->buddies, them);
 			if (buddy)
 				resources = buddy->resources;
-		} else 
-			resources = client->buddy->resources;
+		} else {
+			if (client->buddy) {
+				resources = client->buddy->resources;
+			} else {
+				ast_log(LOG_ERROR,"no gtalk capable cliets to talk to.\n");
+				return NULL;
+			}
+		}
 		while (resources) {
 			if (resources->cap->jingle) {
 				break;
@@ -880,8 +886,6 @@
 	} else
 		exten = tmp->us;
 	ast_copy_string(tmp->exten,  exten, sizeof(tmp->exten));
-	if(data)
-		free(data);
 	ast_mutex_init(&tmp->lock);
 	ast_mutex_lock(&gtalklock);
 	tmp->next = client->p;



More information about the asterisk-commits mailing list