diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:32:08 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:32:08 +0000 |
commit | 2575db2212e7d80f55f6804f83d63e9a1cf48798 (patch) | |
tree | e7f13c5a00659352f3f3249fa9149a50db6dbceb /apps | |
parent | 30a7992b379e6488d2e53b324c25de8d92c3aaac (diff) |
Merged revisions 53045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines
Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_meetme.c | 1 | ||||
-rw-r--r-- | apps/app_queue.c | 1 | ||||
-rw-r--r-- | apps/app_rpt.c | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 444f3c7b9..0e54aa4fc 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -1072,6 +1072,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c pthread_attr_init(&conf->attr); pthread_attr_setdetachstate(&conf->attr, PTHREAD_CREATE_DETACHED); ast_pthread_create_background(&conf->recordthread, &conf->attr, recordthread, conf); + pthread_attr_destroy(&conf->attr); } time(&user->jointime); diff --git a/apps/app_queue.c b/apps/app_queue.c index 5442e24c7..9bb6b5b7d 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -609,6 +609,7 @@ static int statechange_queue(const char *dev, int state, void *ign) ast_log(LOG_WARNING, "Failed to create update thread!\n"); free(sc); } + pthread_attr_destroy(&attr); return 0; } diff --git a/apps/app_rpt.c b/apps/app_rpt.c index 9872051cb..34732a25a 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -2613,6 +2613,7 @@ pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); res = ast_pthread_create(&tele->threadid,&attr,rpt_tele_thread,(void *) tele); + pthread_attr_destroy(&attr); if(res < 0){ rpt_mutex_lock(&myrpt->lock); remque((struct qlem *) tele); /* We don't like stuck transmitters, remove it from the queue */ @@ -3380,6 +3381,7 @@ static int function_autopatchup(struct rpt *myrpt, char *param, char *digitbuf, pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ast_pthread_create(&myrpt->rpt_call_thread,&attr,rpt_call,(void *) myrpt); + pthread_attr_destroy(&attr); return DC_COMPLETE; } @@ -5936,6 +5938,7 @@ char cmd[MAXDTMF+1] = ""; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ast_pthread_create(&myrpt->rpt_call_thread,&attr,rpt_call,(void *)myrpt); + pthread_attr_destroy(&attr); return; } } @@ -7219,6 +7222,7 @@ struct ast_config *cfg; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ast_pthread_create(&rpt_vars[i].rpt_thread,&attr,rpt,(void *) &rpt_vars[i]); + pthread_attr_destroy(&attr); } usleep(500000); for(;;) @@ -7254,6 +7258,7 @@ struct ast_config *cfg; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ast_pthread_create(&rpt_vars[i].rpt_thread,&attr,rpt,(void *) &rpt_vars[i]); + pthread_attr_destroy(&attr); ast_log(LOG_WARNING, "rpt_thread restarted on node %s\n", rpt_vars[i].name); } |