[Asterisk-cvs] asterisk asterisk.c,1.51.2.6,1.51.2.7 autoservice.c,1.3,1.3.2.1
citats at lists.digium.com
citats at lists.digium.com
Mon Mar 15 02:58:57 CST 2004
- Previous message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.33,1.34 chan_iax.c,1.51,1.52 chan_iax2.c,1.105,1.106 chan_mgcp.c,1.35,1.36 chan_modem.c,1.19,1.20 chan_phone.c,1.22,1.23 chan_sip.c,1.308,1.309 chan_skinny.c,1.30,1.31 chan_vofr.c,1.12,1.13 chan_zap.c,1.190,1.191
- Next message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.31,1.31.2.1 chan_iax.c,1.49,1.49.2.1 chan_iax2.c,1.91.2.8,1.91.2.9 chan_mgcp.c,1.34,1.34.2.1 chan_modem.c,1.19,1.19.2.1 chan_phone.c,1.22,1.22.2.1 chan_sip.c,1.292.2.17,1.292.2.18 chan_skinny.c,1.27,1.27.2.1 chan_vofr.c,1.12,1.12.2.1 chan_zap.c,1.171.2.14,1.171.2.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv10435
Modified Files:
Tag: v1-0_stable
asterisk.c autoservice.c
Log Message:
Fix bug 1217. Change pthread_t initializers to AST_PTHREADT_NULL and
AST_PTHREADT_STOP
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.51.2.6
retrieving revision 1.51.2.7
diff -u -d -r1.51.2.6 -r1.51.2.7
--- asterisk.c 4 Mar 2004 21:34:32 -0000 1.51.2.6
+++ asterisk.c 15 Mar 2004 07:53:02 -0000 1.51.2.7
@@ -34,7 +34,7 @@
#include <signal.h>
#include <sched.h>
#include <asterisk/io.h>
-#include <pthread.h>
+#include <asterisk/lock.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/select.h>
@@ -109,7 +109,7 @@
static char *_argv[256];
static int shuttingdown = 0;
static int restartnow = 0;
-static pthread_t consolethread = (pthread_t) -1;
+static pthread_t consolethread = AST_PTHREADT_NULL;
int ast_register_atexit(void (*func)(void))
{
@@ -544,7 +544,7 @@
restartnow = 1;
/* If there is a consolethread running send it a SIGHUP
so it can execvp, otherwise we can do it ourselves */
- if (consolethread != (pthread_t) -1) {
+ if (consolethread != AST_PTHREADT_NULL) {
pthread_kill(consolethread, SIGHUP);
/* Give the signal handler some time to complete */
sleep(2);
@@ -591,7 +591,7 @@
fflush(stdout);
if (complete)
/* Wake up a select()ing console */
- if (option_console && consolethread != (pthread_t) -1)
+ if (option_console && consolethread != AST_PTHREADT_NULL)
pthread_kill(consolethread, SIGURG);
}
Index: autoservice.c
===================================================================
RCS file: /usr/cvsroot/asterisk/autoservice.c,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- autoservice.c 8 Sep 2003 16:48:06 -0000 1.3
+++ autoservice.c 15 Mar 2004 07:53:02 -0000 1.3.2.1
@@ -44,7 +44,7 @@
};
static struct asent *aslist = NULL;
-static pthread_t asthread = (pthread_t) -1;
+static pthread_t asthread = AST_PTHREADT_NULL;
static void *autoservice_run(void *ign)
{
@@ -80,7 +80,7 @@
ast_frfree(f);
}
}
- asthread = (pthread_t) -1;
+ asthread = AST_PTHREADT_NULL;
return NULL;
}
@@ -90,7 +90,7 @@
struct asent *as;
int needstart;
ast_mutex_lock(&autolock);
- needstart = (asthread == (pthread_t) -1) ? 1 : 0 /* aslist ? 0 : 1 */;
+ needstart = (asthread == AST_PTHREADT_NULL) ? 1 : 0 /* aslist ? 0 : 1 */;
as = aslist;
while(as) {
if (as->chan == chan)
@@ -142,7 +142,7 @@
if (!chan->_softhangup)
res = 0;
}
- if (asthread != (pthread_t) -1)
+ if (asthread != AST_PTHREADT_NULL)
pthread_kill(asthread, SIGURG);
ast_mutex_unlock(&autolock);
/* Wait for it to un-block */
- Previous message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.33,1.34 chan_iax.c,1.51,1.52 chan_iax2.c,1.105,1.106 chan_mgcp.c,1.35,1.36 chan_modem.c,1.19,1.20 chan_phone.c,1.22,1.23 chan_sip.c,1.308,1.309 chan_skinny.c,1.30,1.31 chan_vofr.c,1.12,1.13 chan_zap.c,1.190,1.191
- Next message: [Asterisk-cvs] asterisk/channels chan_h323.c,1.31,1.31.2.1 chan_iax.c,1.49,1.49.2.1 chan_iax2.c,1.91.2.8,1.91.2.9 chan_mgcp.c,1.34,1.34.2.1 chan_modem.c,1.19,1.19.2.1 chan_phone.c,1.22,1.22.2.1 chan_sip.c,1.292.2.17,1.292.2.18 chan_skinny.c,1.27,1.27.2.1 chan_vofr.c,1.12,1.12.2.1 chan_zap.c,1.171.2.14,1.171.2.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list