[asterisk-commits] rmudgett: trunk r238527 - /trunk/channels/sig_pri.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 7 15:24:10 CST 2010
Author: rmudgett
Date: Thu Jan 7 15:24:06 2010
New Revision: 238527
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238527
Log:
Fix using the wrong pointer type in do_idle_thread().
Modified:
trunk/channels/sig_pri.c
Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=238527&r1=238526&r2=238527
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Thu Jan 7 15:24:06 2010
@@ -1191,14 +1191,15 @@
}
#endif /* defined(HAVE_PRI_CALL_HOLD) */
-static void *do_idle_thread(void *vchan)
-{
- struct ast_channel *chan = vchan;
- struct sig_pri_chan *pvt = chan->tech_pvt;
+static void *do_idle_thread(void *v_pvt)
+{
+ struct sig_pri_chan *pvt = v_pvt;
+ struct ast_channel *chan = pvt->owner;
struct ast_frame *f;
char ex[80];
/* Wait up to 30 seconds for an answer */
int newms, ms = 30000;
+
ast_verb(3, "Initiating idle call on channel %s\n", chan->name);
snprintf(ex, sizeof(ex), "%d/%s", pvt->channel, pvt->pri->idledial);
if (ast_call(chan, ex, 0)) {
@@ -1966,7 +1967,7 @@
idle = sig_pri_request(pri->pvts[nextidle], AST_FORMAT_ULAW, NULL, 0);
if (idle) {
pri->pvts[nextidle]->isidlecall = 1;
- if (ast_pthread_create_background(&p, NULL, do_idle_thread, idle)) {
+ if (ast_pthread_create_background(&p, NULL, do_idle_thread, pri->pvts[nextidle])) {
ast_log(LOG_WARNING, "Unable to start new thread for idle channel '%s'\n", idle->name);
ast_hangup(idle);
}
More information about the asterisk-commits
mailing list