[asterisk-commits] branch mogorman/asterisk-xmpp r21640 -
/team/mogorman/asterisk-xmpp/res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Apr 19 14:29:50 MST 2006
Author: mogorman
Date: Wed Apr 19 16:29:49 2006
New Revision: 21640
URL: http://svn.digium.com/view/asterisk?rev=21640&view=rev
Log:
and the day is saved.
Modified:
team/mogorman/asterisk-xmpp/res/res_jabber.c
Modified: team/mogorman/asterisk-xmpp/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/res/res_jabber.c?rev=21640&r1=21639&r2=21640&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/res/res_jabber.c (original)
+++ team/mogorman/asterisk-xmpp/res/res_jabber.c Wed Apr 19 16:29:49 2006
@@ -152,22 +152,22 @@
}
-static iks *jabber_find(iks *node, char *search)
-{
- ast_verbose("PRETTY!!!\n");
-
+static int gtalk_yuck(iks *node)
+{
iks *tmp= node;
iks *next = tmp;
while(tmp) {
while(next)
{
- ast_verbose("PRETTY!!! %s\n",iks_name(next));
- next=iks_child(next);
+ if(iks_find_attrib(next,"node"))
+ if(!strcasecmp("http://www.google.com/xmpp/client/caps",iks_find_attrib(next,"node")))
+ return 1;
+ next=iks_next(next);
}
tmp=iks_child(tmp);
next=tmp;
}
- return NULL;
+ return 0;
}
/*!
* \brief Detects the highest bit in a number.
@@ -867,14 +867,7 @@
while(tmp) {
if(!strcasecmp(tmp->resource,pak->from->resource)) {
tmp->status=status;
- jabber_find(pak->x, NULL);
- if(iks_find_with_attrib(pak->query, "c", "node", "http://www.google.com/xmpp/client/caps")) {
- ast_verbose("FOUND IT!!!\n");
- tmp->jinglecapable=1;
- } else {
- ast_verbose("DIDINT FOUND IT!!!\n");
- tmp->jinglecapable=0;
- }
+ tmp->jinglecapable=gtalk_yuck(pak->x);
if(status == 6) { /* Sign off Destroy resource */
ast_verbose("KILL THE SIGN OFF!\n");
found = tmp;
@@ -938,17 +931,10 @@
ast_copy_string(found->resource, pak->from->resource, sizeof(found->resource));
found->status = status;
found->priority = priority;
- if(iks_find_attrib(pak->query,"node")) {
- ast_verbose("FOUND IT!!!\n");
- found->jinglecapable=1;
- } else {
- ast_verbose("DIDINT FOUND IT!!!\n");
- found->jinglecapable=0;
- }
found->next = NULL;
last = NULL;
tmp = buddy->resources;
- jabber_find(pak->x, NULL);
+ found->jinglecapable=gtalk_yuck(pak->x);
while(tmp) {
if(found->priority > tmp->priority) {
if(last) last->next = found;
More information about the asterisk-commits
mailing list