[Asterisk-cvs] asterisk/channels chan_agent.c, 1.81.2.4,
1.81.2.5 chan_local.c, 1.32.2.2, 1.32.2.3 iax2-parser.c,
1.27.2.2, 1.27.2.3
russell at lists.digium.com
russell at lists.digium.com
Mon May 9 23:21:48 CDT 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv788/channels
Modified Files:
Tag: v1-0
chan_agent.c chan_local.c iax2-parser.c
Log Message:
fix queue URL passing (bug #3543)
Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.81.2.4
retrieving revision 1.81.2.5
diff -u -d -r1.81.2.4 -r1.81.2.5
--- chan_agent.c 15 Apr 2005 07:06:40 -0000 1.81.2.4
+++ chan_agent.c 10 May 2005 03:28:01 -0000 1.81.2.5
@@ -379,6 +379,17 @@
return f;
}
+static int agent_sendhtml(struct ast_channel *ast, int subclass, char *data, int datalen)
+{
+ struct agent_pvt *p = ast->pvt->pvt;
+ int res = -1;
+ ast_mutex_lock(&p->lock);
+ if (p->chan)
+ res = ast_channel_sendhtml(p->chan, subclass, data, datalen);
+ ast_mutex_unlock(&p->lock);
+ return res;
+}
+
static int agent_write(struct ast_channel *ast, struct ast_frame *f)
{
struct agent_pvt *p = ast->pvt->pvt;
@@ -748,6 +759,7 @@
tmp->pvt->answer = agent_answer;
tmp->pvt->read = agent_read;
tmp->pvt->write = agent_write;
+ tmp->pvt->send_html = agent_sendhtml;
tmp->pvt->exception = agent_read;
tmp->pvt->indicate = agent_indicate;
tmp->pvt->fixup = agent_fixup;
Index: chan_local.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_local.c,v
retrieving revision 1.32.2.2
retrieving revision 1.32.2.3
diff -u -d -r1.32.2.2 -r1.32.2.3
--- chan_local.c 15 Dec 2004 19:07:10 -0000 1.32.2.2
+++ chan_local.c 10 May 2005 03:28:01 -0000 1.32.2.3
@@ -139,7 +139,7 @@
{
if (p->alreadymasqed || p->nooptimization)
return;
- if (isoutbound && p->chan && p->chan->bridge && p->owner) {
+ if (isoutbound && p->chan && p->chan->bridge && p->owner && !p->owner->pvt->readq) {
/* Masquerade bridged channel into owner */
/* Lock everything we need, one by one, and give up if
we can't get everything. Remember, we'll get another
@@ -152,7 +152,7 @@
}
ast_mutex_unlock(&p->chan->bridge->lock);
}
- } else if (!isoutbound && p->owner && p->owner->bridge && p->chan) {
+ } else if (!isoutbound && p->owner && p->owner->bridge && p->chan && !p->chan->pvt->readq) {
/* Masquerade bridged channel into chan */
if (!ast_mutex_trylock(&p->owner->bridge->lock)) {
if (!ast_mutex_trylock(&p->chan->lock)) {
@@ -233,6 +233,22 @@
return res;
}
+static int local_sendhtml(struct ast_channel *ast, int subclass, char *data, int datalen)
+{
+ struct local_pvt *p = ast->pvt->pvt;
+ int res = -1;
+ struct ast_frame f = { AST_FRAME_HTML, };
+ int isoutbound;
+ ast_mutex_lock(&p->lock);
+ isoutbound = IS_OUTBOUND(ast, p);
+ f.subclass = subclass;
+ f.data = data;
+ f.datalen = datalen;
+ res = local_queue_frame(p, isoutbound, &f, ast);
+ ast_mutex_unlock(&p->lock);
+ return res;
+}
+
static int local_call(struct ast_channel *ast, char *dest, int timeout)
{
struct local_pvt *p = ast->pvt->pvt;
@@ -425,6 +441,8 @@
tmp2->pvt->pvt = p;
tmp->pvt->send_digit = local_digit;
tmp2->pvt->send_digit = local_digit;
+ tmp->pvt->send_html = local_sendhtml;
+ tmp2->pvt->send_html = local_sendhtml;
tmp->pvt->call = local_call;
tmp2->pvt->call = local_call;
tmp->pvt->hangup = local_hangup;
Index: iax2-parser.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/iax2-parser.c,v
retrieving revision 1.27.2.2
retrieving revision 1.27.2.3
diff -u -d -r1.27.2.2 -r1.27.2.3
--- iax2-parser.c 5 Apr 2005 07:10:06 -0000 1.27.2.2
+++ iax2-parser.c 10 May 2005 03:28:01 -0000 1.27.2.3
@@ -299,7 +299,9 @@
"NULL ",
"IAX ",
"TEXT ",
- "IMAGE " };
+ "IMAGE ",
+ "HTML ",
+ "CNG " };
char *iaxs[] = {
"(0?)",
"NEW ",
@@ -371,7 +373,7 @@
/* Don't mess with mini-frames */
return;
}
- if (fh->type > (int)sizeof(frames)/(int)sizeof(char *)) {
+ if (fh->type >= (int)sizeof(frames)/(int)sizeof(frames[0])) {
snprintf(class2, (int)sizeof(class2), "(%d?)", fh->type);
class = class2;
} else {
More information about the svn-commits
mailing list