[svn-commits] mogorman: branch mogorman/asterisk-jabber r41276 -
/team/mogorman/asterisk-ja...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Tue Aug 29 11:46:32 MST 2006
Author: mogorman
Date: Tue Aug 29 13:46:31 2006
New Revision: 41276
URL: http://svn.digium.com/view/asterisk?rev=41276&view=rev
Log:
fixed som ugly spaces and updating gtalk to new rtp stuff.
Modified:
team/mogorman/asterisk-jabber/channels/chan_gtalk.c
team/mogorman/asterisk-jabber/channels/chan_jingle.c
Modified: team/mogorman/asterisk-jabber/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/channels/chan_gtalk.c?rev=41276&r1=41275&r2=41276&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/channels/chan_gtalk.c (original)
+++ team/mogorman/asterisk-jabber/channels/chan_gtalk.c Tue Aug 29 13:46:31 2006
@@ -159,7 +159,7 @@
};
struct gtalk_container {
- ASTOBJ_CONTAINER_COMPONENTS(struct gtalk);
+ ASTOBJ_CONTAINER_COMPONENTS(struct gtalk);
};
static const char desc[] = "Gtalk Channel";
@@ -190,7 +190,7 @@
/*----- RTP interface functions */
static int gtalk_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp,
struct ast_rtp *vrtp, int codecs, int nat_active);
-static struct ast_rtp *gtalk_get_rtp_peer(struct ast_channel *chan);
+static enum ast_rtp_get_rtesult *gtalk_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
static int gtalk_get_codec(struct ast_channel *chan);
/*! \brief PBX interface structure for channel registration */
@@ -516,18 +516,22 @@
return res;
}
-static struct ast_rtp *gtalk_get_rtp_peer(struct ast_channel *chan)
+static enum ast_rtp_get_result *gtalk_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp)
{
struct gtalk_pvt *p = chan->tech_pvt;
- struct ast_rtp *rtp = NULL;
+ enum ast_rtp_get_result res = AST_RTP_GET_FAILED;
if (!p)
- return NULL;
+ return res;
+
ast_mutex_lock(&p->lock);
- if (p->rtp)
+ if (p->rtp){
rtp = p->rtp;
+ res = AST_RTP_TRY_NATIVE;
+ }
ast_mutex_unlock(&p->lock);
- return rtp;
+
+ return res;
}
static int gtalk_get_codec(struct ast_channel *chan)
@@ -635,7 +639,7 @@
"unsupported-dtmf-method xmlns='http://jabber.org/protocol/gtalk/info/dtmf#errors'");
return -1;
}
- if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
+ if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
if((dtmf = iks_find_attrib(dtmfnode, "code"))) {
if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-up")) {
struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
@@ -778,7 +782,7 @@
ast_aji_increment_mid(c->mid);
iks_insert_attrib(gtalk, "type", "transport-info");
iks_insert_attrib(gtalk, "id", sid);
- iks_insert_attrib(gtalk, "initiator", (p->initiator) ? to : from);
+ iks_insert_attrib(gtalk, "initiator", (p->initiator) ? to : from);
iks_insert_attrib(gtalk, "xmlns", GOOGLE_NS);
iks_insert_attrib(candidate, "name", tmp->name);
iks_insert_attrib(candidate, "address", tmp->ip);
@@ -1052,7 +1056,7 @@
tmp = tmp->next;
}
- p = gtalk_alloc(client, from, pak->from->full, iks_find_attrib(pak->query, "id"));
+ p = gtalk_alloc(client, from, pak->from->full, iks_find_attrib(pak->query, "id"));
if (!p) {
ast_log(LOG_WARNING, "Unable to allocate gtalk structure!\n");
return -1;
@@ -1132,7 +1136,7 @@
struct gtalk_pvt *p = NULL, *tmp = NULL;
struct aji_client *c = client->connection;
struct gtalk_candidate *newcandidate = NULL;
- iks *traversenodes = NULL, *receipt = NULL;
+ iks *traversenodes = NULL, *receipt = NULL;
char *from;
from = iks_find_attrib(pak->x,"to");
@@ -1801,9 +1805,9 @@
ASTOBJ_WRLOCK(iterator);
privates = iterator->p;
while(privates) {
- if (privates->owner)
- ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
- privates = privates->next;
+ if (privates->owner)
+ ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
+ privates = privates->next;
}
iterator->p = NULL;
ASTOBJ_UNLOCK(iterator);
Modified: team/mogorman/asterisk-jabber/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/channels/chan_jingle.c?rev=41276&r1=41275&r2=41276&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/channels/chan_jingle.c (original)
+++ team/mogorman/asterisk-jabber/channels/chan_jingle.c Tue Aug 29 13:46:31 2006
@@ -156,7 +156,7 @@
};
struct jingle_container {
- ASTOBJ_CONTAINER_COMPONENTS(struct jingle);
+ ASTOBJ_CONTAINER_COMPONENTS(struct jingle);
};
static const char desc[] = "Jingle Channel";
@@ -519,7 +519,7 @@
"unsupported-dtmf-method xmlns='http://jabber.org/protocol/jingle/info/dtmf#errors'");
return -1;
}
- if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
+ if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
if((dtmf = iks_find_attrib(dtmfnode, "code"))) {
if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-up")) {
struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
@@ -993,7 +993,7 @@
struct jingle_pvt *p = NULL, *tmp = NULL;
struct aji_client *c = client->connection;
struct jingle_candidate *newcandidate = NULL;
- iks *traversenodes = NULL, *receipt = NULL;
+ iks *traversenodes = NULL, *receipt = NULL;
newcandidate = ast_calloc(1, sizeof(*newcandidate));
if (!newcandidate)
return 0;
@@ -1707,9 +1707,9 @@
ASTOBJ_WRLOCK(iterator);
privates = iterator->p;
while(privates) {
- if (privates->owner)
- ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
- privates = privates->next;
+ if (privates->owner)
+ ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
+ privates = privates->next;
}
iterator->p = NULL;
ASTOBJ_UNLOCK(iterator);
More information about the svn-commits
mailing list