diff options
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_dial.c | 4 | ||||
-rwxr-xr-x | apps/app_queue.c | 5 | ||||
-rwxr-xr-x | apps/app_rpt.c | 3 | ||||
-rwxr-xr-x | apps/app_voicemail.c | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 67f82fd73..8b096c40c 100755 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -122,7 +122,7 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception } } -#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 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu 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; diff --git a/apps/app_queue.c b/apps/app_queue.c index a406eea43..e36bbda8e 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -330,6 +330,7 @@ static void destroy_queue(struct ast_call_queue *q) } ast_mutex_unlock(&qlock); free_members(q, 1); + ast_mutex_destroy(&q->lock); free(q); } @@ -628,7 +629,7 @@ static int valid_exit(struct queue_ent *qe, char digit) 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 @@ static struct localuser *wait_for_answer(struct queue_ent *qe, struct localuser 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; diff --git a/apps/app_rpt.c b/apps/app_rpt.c index a4992cb1e..9edd77f52 100755 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -2113,7 +2113,10 @@ static int rpt_exec(struct ast_channel *chan, void *data) 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; } diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 224f78dac..803ea4c2a 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -330,7 +330,7 @@ static void apply_options(struct ast_vm_user *vmu, char *options) PGconn *dbhandler; char dboption[256]; -ast_mutex_t postgreslock; +AST_MUTEX_DEFINE_STATIC(postgreslock); static int sql_init(void) { @@ -342,8 +342,6 @@ static int sql_init(void) 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); } |