[asterisk-commits] branch mogorman/asterisk-xmpp r21785 - /team/mogorman/asterisk-xmpp/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 21 01:05:22 MST 2006


Author: mogorman
Date: Fri Apr 21 03:05:21 2006
New Revision: 21785

URL: http://svn.digium.com/view/asterisk?rev=21785&view=rev
Log: (empty)

Modified:
    team/mogorman/asterisk-xmpp/channels/chan_jingle.c

Modified: team/mogorman/asterisk-xmpp/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/channels/chan_jingle.c?rev=21785&r1=21784&r2=21785&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/channels/chan_jingle.c (original)
+++ team/mogorman/asterisk-xmpp/channels/chan_jingle.c Fri Apr 21 03:05:21 2006
@@ -251,6 +251,7 @@
 		
 			iks_insert_attrib(jingle, "xmlns", "http://www.google.com/session");
 			iks_insert_attrib(jingle, "type", JINGLE_ACCEPT);
+			ast_verbose("WOOH %d\n",p->initiator);
 			iks_insert_attrib(jingle, "initiator", p->initiator ? client->connection->jid->full : p->from);
 			iks_insert_attrib(jingle, GOOGLE_SID, tmp->sid);
 			iks_insert_node(iq,jingle);
@@ -443,7 +444,6 @@
 	ours1->type=AJI_CONNECT_LOCAL;
 	ours1->generation=0;
 	p->ourcandidates=ours1;
-	ours1 = NULL;
 
 	if (!ast_strlen_zero(externip)) {
 		/* XXX We should really stun for this one not just go with externip XXX */
@@ -461,7 +461,7 @@
 		ours1->next=ours2;
 		ours2 = NULL;
 	}
-
+	ours1 = NULL;
 	dest.sin_addr = __ourip; /// THIS IS BAD NEED TO FIX
 	dest.sin_port = sin.sin_port;
 	
@@ -524,6 +524,7 @@
 	char idroster[200];
 
 	if(!sid && !strchr(from,"/")) { /*I started call! */
+		ast_verbose("shouldnt be called on inbound!\n");
 		resources=client->buddy->resources;
 		while(resources) {
 			if(resources->jinglecapable) {
@@ -532,7 +533,6 @@
 			}
 			resources=resources->next;
 		}
-		ast_verbose("oh indeed %s\n",resources->resource);
 		if(resources)
 			snprintf(idroster,sizeof(idroster), "%s/%s",client->user,resources->resource);
 		else {
@@ -540,7 +540,6 @@
 			return NULL;
 		}
 	}
-	ast_verbose("oh indeed %s\n",idroster);
 	if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
 		return NULL;
 	}
@@ -1049,9 +1048,10 @@
 		 return -1;
 	 }
 	 
+	 	ast_setstate(ast, AST_STATE_RING);
 		p->jointcapability = p->capability;
 		jingle_transmit_invite(p);
-	 return 1;
+	 return 0;
 }
 
 /*! \brief Hangup a call through the jingle proxy channel */
@@ -1067,6 +1067,8 @@
 	int glaredetect;
 	const char *status;
 
+
+	ast_verbose("what caused this!\n");
 	ast_mutex_lock(&p->lock);
 	client = p->parent;
 	p->owner = NULL;
@@ -1174,6 +1176,7 @@
 		jingle_add_candidate(client,pak);
 		ast_log(LOG_DEBUG, "Candidate Added!\n");
 	} else if(iks_find_with_attrib(pak->x,GOOGLE_NODE,"type","terminate")) {
+		ast_verbose("not this\n");
 		jingle_hangup_farend(client, pak);
 	}
 	return 1;



More information about the asterisk-commits mailing list