[Asterisk-cvs] asterisk SECURITY,1.2,1.3 pbx.c,1.107,1.108
markster at lists.digium.com
markster at lists.digium.com
Fri Apr 2 02:25:25 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv19889
Modified Files:
SECURITY pbx.c
Log Message:
Update security document, work on threading with pbx.c and small SIP fixes
Index: SECURITY
===================================================================
RCS file: /usr/cvsroot/asterisk/SECURITY,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SECURITY 10 Nov 2001 18:09:19 -0000 1.2
+++ SECURITY 2 Apr 2004 07:24:33 -0000 1.3
@@ -25,15 +25,15 @@
in the appropriate section. A well designed PBX might look like this:
[longdistance]
-exten => _91NXXNXXXXXX,1,Dial,Tor/g2/BYEXTENSION
+exten => _91NXXNXXXXXX,1,Dial(Zap/g2/${EXTEN:1})
include => local
[local]
-exten => _9NXXNXXX,1,Dial,Tor/g2/BYEXTENSION
+exten => _9NXXNXXX,1,Dial(Zap/g2/${EXTEN:1})
include => default
[default]
-exten => 6123,Dial,Tor/1
+exten => 6123,Dial(Zap/1)
DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT. There
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- pbx.c 24 Mar 2004 05:01:44 -0000 1.107
+++ pbx.c 2 Apr 2004 07:24:33 -0000 1.108
@@ -4044,7 +4044,10 @@
if (appdata)
strncpy(as->appdata, appdata, sizeof(as->appdata) - 1);
as->timeout = timeout;
- if (pthread_create(&as->p, NULL, async_wait, as)) {
+ /* Start a new thread, and get something handling this channel. */
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ if (pthread_create(&as->p, &attr, async_wait, as)) {
ast_log(LOG_WARNING, "Failed to start async wait\n");
free(as);
ast_hangup(chan);
More information about the svn-commits
mailing list