Index: chan_mgcp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** chan_mgcp.c 19 Aug 2003 15:13:54 -0000 1.18
--- chan_mgcp.c 8 Sep 2003 16:48:06 -0000 1.19
***************
*** 414,418 ****
if (sub->messagepending && (sub->lastouttime + 20 < t)) {
ast_log(LOG_NOTICE, "Timeout waiting for response to message:%d, lastouttime: %ld, now: %ld. Dumping pending queue\n",
! sub->msgs ? sub->msgs->seqno : -1, sub->lastouttime, t);
dump_queue(sub->parent);
}
--- 414,418 ----
if (sub->messagepending && (sub->lastouttime + 20 < t)) {
ast_log(LOG_NOTICE, "Timeout waiting for response to message:%d, lastouttime: %ld, now: %ld. Dumping pending queue\n",
! sub->msgs ? sub->msgs->seqno : -1, (long) sub->lastouttime, (long) t);
dump_queue(sub->parent);
}
***************
*** 2547,2551 ****
{
/* If we're supposed to be stopped -- stay stopped */
! if (monitor_thread == -2)
return 0;
if (ast_mutex_lock(&monlock)) {
--- 2547,2551 ----
{
/* If we're supposed to be stopped -- stay stopped */
! if (monitor_thread == (pthread_t) -2)
return 0;
if (ast_mutex_lock(&monlock)) {
Index: chan_modem.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_modem.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** chan_modem.c 16 Aug 2003 05:10:35 -0000 1.5
--- chan_modem.c 8 Sep 2003 16:48:06 -0000 1.6
***************
*** 29,32 ****
--- 29,33 ----
#include <unistd.h>
#include <stdlib.h>
+ #include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
***************
*** 83,87 ****
/* This is the thread for the monitor which checks for input on the channels
which are not currently in use. */
! static pthread_t monitor_thread = -1;
static int restart_monitor(void);
--- 84,88 ----
/* This is the thread for the monitor which checks for input on the channels
which are not currently in use. */
! static pthread_t monitor_thread = (pthread_t) -1;
static int restart_monitor(void);
***************
*** 645,649 ****
{
/* If we're supposed to be stopped -- stay stopped */
! if (monitor_thread == -2)
return 0;
if (ast_mutex_lock(&monlock)) {
--- 646,650 ----
{
/* If we're supposed to be stopped -- stay stopped */
! if (monitor_thread == (pthread_t) -2)
return 0;
if (ast_mutex_lock(&monlock)) {
***************
*** 656,660 ****
return -1;
}
! if (monitor_thread != -1) {
pthread_cancel(monitor_thread);
/* Nudge it a little, as it's probably stuck in select */
--- 657,661 ----
return -1;
}
! if (monitor_thread != (pthread_t) -1) {
pthread_cancel(monitor_thread);
/* Nudge it a little, as it's probably stuck in select */
***************
*** 950,958 ****
}
if (!ast_mutex_lock(&monlock)) {
! if (monitor_thread > -1) {
pthread_cancel(monitor_thread);
pthread_join(monitor_thread, NULL);
}
! monitor_thread = -2;
ast_mutex_unlock(&monlock);
} else {
--- 951,959 ----
}
if (!ast_mutex_lock(&monlock)) {
! if (monitor_thread != (pthread_t) -1 && monitor_thread != (pthread_t) -2) {
pthread_cancel(monitor_thread);
pthread_join(monitor_thread, NULL);
}
! monitor_thread = (pthread_t) -2;
ast_mutex_unlock(&monlock);
} else {
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum