[Asterisk-cvs] asterisk/apps app_dial.c,1.77,1.78 app_queue.c,1.70,1.71 app_rpt.c,1.6,1.7 app_voicemail.c,1.113,1.114
markster at lists.digium.com
markster at lists.digium.com
Tue Jun 22 13:56:18 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv21170/apps
Modified Files:
app_dial.c app_queue.c app_rpt.c app_voicemail.c
Log Message:
Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- app_dial.c 22 Jun 2004 13:53:45 -0000 1.77
+++ app_dial.c 22 Jun 2004 17:42:13 -0000 1.78
@@ -122,7 +122,7 @@
}
}
-#define MAX 256
+#define AST_MAX_WATCHERS 256
static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect, int *sentringing)
{
@@ -133,7 +133,7 @@
int orig = *to;
struct ast_frame *f;
struct ast_channel *peer = NULL;
- struct ast_channel *watchers[MAX];
+ struct ast_channel *watchers[AST_MAX_WATCHERS];
int pos;
int single;
struct ast_channel *winner;
Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- app_queue.c 19 Jun 2004 16:00:50 -0000 1.70
+++ app_queue.c 22 Jun 2004 17:42:13 -0000 1.71
@@ -330,6 +330,7 @@
}
ast_mutex_unlock(&qlock);
free_members(q, 1);
+ ast_mutex_destroy(&q->lock);
free(q);
}
@@ -628,7 +629,7 @@
return 0;
}
-#define MAX 256
+#define AST_MAX_WATCHERS 256
static struct localuser *wait_for_answer(struct queue_ent *qe, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect, char *digit)
{
@@ -641,7 +642,7 @@
int orig = *to;
struct ast_frame *f;
struct localuser *peer = NULL;
- struct ast_channel *watchers[MAX];
+ struct ast_channel *watchers[AST_MAX_WATCHERS];
int pos;
struct ast_channel *winner;
struct ast_channel *in = qe->chan;
Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_rpt.c 21 Jun 2004 04:24:50 -0000 1.6
+++ app_rpt.c 22 Jun 2004 17:42:13 -0000 1.7
@@ -2113,7 +2113,10 @@
int unload_module(void)
{
+ int i;
STANDARD_HANGUP_LOCALUSERS;
+ for(i = 0; i < nrpts; i++) {
+ ast_mutex_destroy(&rpt_vars[i].lock);
return ast_unregister_application(app);
return 0;
}
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- app_voicemail.c 16 Jun 2004 18:35:01 -0000 1.113
+++ app_voicemail.c 22 Jun 2004 17:42:13 -0000 1.114
@@ -330,7 +330,7 @@
PGconn *dbhandler;
char dboption[256];
-ast_mutex_t postgreslock;
+AST_MUTEX_DEFINE_STATIC(postgreslock);
static int sql_init(void)
{
@@ -342,8 +342,6 @@
ast_log(LOG_WARNING, "Error Logging into database %s: %s\n",dboption,PQerrorMessage(dbhandler));
return(-1);
}
- ast_mutex_init(&postgreslock);
-
/* fprintf(stderr,"postgres login OK\n"); */
return(0);
}
More information about the svn-commits
mailing list