[asterisk-commits] branch mogorman/asterisk-xmpp r8704 - in /team/mogorman/asterisk-xmpp: ./ inc...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 25 23:37:08 MST 2006


Author: mogorman
Date: Thu Jan 26 00:37:08 2006
New Revision: 8704

URL: http://svn.digium.com/view/asterisk?rev=8704&view=rev
Log:
a bit more.

Modified:
    team/mogorman/asterisk-xmpp/Makefile
    team/mogorman/asterisk-xmpp/include/asterisk/res_xmpp.h
    team/mogorman/asterisk-xmpp/res/res_xmpp.c

Modified: team/mogorman/asterisk-xmpp/Makefile
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/Makefile?rev=8704&r1=8703&r2=8704&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/Makefile (original)
+++ team/mogorman/asterisk-xmpp/Makefile Thu Jan 26 00:37:08 2006
@@ -44,7 +44,7 @@
 #K6OPT  = -DK6OPT
 
 #Tell gcc to optimize the code
-OPTIMIZE+=-O6
+OPTIMIZE+=#-O6
 else
   # Stack backtraces, while useful for debugging, are incompatible with optimizations
   ifeq (${OSARCH},Linux)
@@ -196,7 +196,7 @@
     PROC=ultrasparc
     OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
     OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
-    OPTIONS+=-fomit-frame-pointer
+    OPTIONS+=#-fomit-frame-pointer
   endif
 
   ifeq ($(PROC),arm)
@@ -338,7 +338,7 @@
 ASTCFLAGS+= $(BUSYDETECT)
 ASTCFLAGS+= $(OPTIONS)
 ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
-ASTCFLAGS+= -fomit-frame-pointer 
+ASTCFLAGS+= #-fomit-frame-pointer 
 endif
 
 SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime

Modified: team/mogorman/asterisk-xmpp/include/asterisk/res_xmpp.h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/include/asterisk/res_xmpp.h?rev=8704&r1=8703&r2=8704&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/include/asterisk/res_xmpp.h (original)
+++ team/mogorman/asterisk-xmpp/include/asterisk/res_xmpp.h Thu Jan 26 00:37:08 2006
@@ -27,21 +27,43 @@
 	AXI_CONNECTED
 };
 
-enum axi_prune_register{
+enum axi_prune_register {
 	AXI_DONOTHING=0,
 	AXI_PRUNE=1,
 	AXI_REGISTER=2
 };
 
-enum axi_btype{
+enum axi_btype {
 	AXI_USER=0,
 	AXI_TRANS=1,
 	AXI_UTRANS=2
 };
 
-enum axi_type{
-		  AXI_COMPONENT=0,
-		  AXI_CLIENT=1,
+enum axi_type {
+	AXI_COMPONENT=0,
+	AXI_CLIENT=1,
+};
+
+enum axi_protocol {
+	AXI_PROTOCOL_UDP=0,
+};
+
+enum axi_connect_type {
+	AXI_CONNECT_STUN=0,
+	AXI_CONNECT_LOCAL=1,
+};
+
+struct axi_candidate {
+	char name[100];
+	enum axi_protocol protocol;
+	double prefrence;
+	char username [100];
+	char password [100];
+	enum axi_connect_type type;
+	int network;
+	int generation;
+	char ip[13];
+	int port;
 };
 
 struct axi_buddy {
@@ -54,6 +76,7 @@
 	enum axi_btype btype;
 	enum axi_prune_register on_roster;
 	int status;
+	struct axi_candidate candidates[3];
 };
 
 struct axi_buddy_container {

Modified: team/mogorman/asterisk-xmpp/res/res_xmpp.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/res/res_xmpp.c?rev=8704&r1=8703&r2=8704&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/res/res_xmpp.c (original)
+++ team/mogorman/asterisk-xmpp/res/res_xmpp.c Thu Jan 26 00:37:08 2006
@@ -414,7 +414,6 @@
 				case IKS_PAK_IQ:
 					ast_verbose(VERBOSE_PREFIX_3 "XMPP: I Dont have an IQ!!!\n");
 					axi_handle_iq(asterisk,pak);
-					ast_verbose(VERBOSE_PREFIX_3 "XMPP: I Dont have an IQ!!!\n");
 					break;
 				default:
 					ast_verbose(VERBOSE_PREFIX_3 "XMPP: I Dont know %i\n",pak->type );
@@ -449,13 +448,32 @@
 	*/
 }
 
+static void axi_handle_jingle(struct axi_master *asterisk, ikspak *pak)
+{
+	if(iks_find_with_attrib(pak->x,"session","type","initiate")) {
+		iks *accept;
+		accept = iks_new("iq");
+		iks_insert_attrib(accept,"type","result");
+		iks_insert_attrib(accept,"from",asterisk->jid->full);
+		iks_insert_attrib(accept,"to",iks_find_attrib(pak->x,"from"));
+		iks_insert_attrib(accept,"id",asterisk->mid);
+		iks_send(asterisk->p,accept);
+		iks_delete(accept);
+	}
+
+}
+
 static void axi_handle_iq(struct axi_master *asterisk, ikspak *pak)
 {
-	if(pak->subtype==IKS_TYPE_GET){
+	if(pak->subtype==IKS_TYPE_GET) {
 		ast_verbose("this is it %s\n",iks_string(asterisk->stack,pak->query));
 		if(iks_find_with_attrib(pak->x,"query","xmlns","http://jabber.org/protocol/disco#info")){
 			axi_handle_discovery(asterisk,pak);
 		}
+	}
+	if(pak->subtype==IKS_TYPE_SET) {
+		if(iks_find_with_attrib(pak->x,"session","xmlns","http://www.google.com/session"))
+			axi_handle_jingle(asterisk,pak);
 	}
 }
 



More information about the asterisk-commits mailing list