summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-01-07 07:31:08 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-01-07 07:31:08 +0000
commit32f05bfa9590fe8cbfe34ffbe67ad5998bbad7b8 (patch)
treeefba24f46c2530249ef3ad8236df7fc1d2378bfd
parent4401b7e67fd06bcc48fcb512952ca7e3bc5c5789 (diff)
Merged revisions 7848 via svnmerge from
/branches/1.2 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--pbx/pbx_spool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 9709f08cf..5d65c6d3c 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -288,10 +288,11 @@ static void launch_service(struct outgoing *o)
{
pthread_t t;
pthread_attr_t attr;
+ int ret;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if (ast_pthread_create(&t,&attr,attempt_thread, o) == -1) {
- ast_log(LOG_WARNING, "Unable to create thread :(\n");
+ if ((ret = ast_pthread_create(&t,&attr,attempt_thread, o)) != 0) {
+ ast_log(LOG_WARNING, "Unable to create thread :( (returned error: %d)\n", ret);
free_outgoing(o);
}
}
@@ -412,6 +413,7 @@ int load_module(void)
{
pthread_t thread;
pthread_attr_t attr;
+ int ret;
snprintf(qdir, sizeof(qdir), "%s/%s", ast_config_AST_SPOOL_DIR, "outgoing");
if (mkdir(qdir, 0700) && (errno != EEXIST)) {
ast_log(LOG_WARNING, "Unable to create queue directory %s -- outgoing spool disabled\n", qdir);
@@ -419,8 +421,8 @@ int load_module(void)
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if (ast_pthread_create(&thread,&attr,scan_thread, NULL) == -1) {
- ast_log(LOG_WARNING, "Unable to create thread :(\n");
+ if ((ret = ast_pthread_create(&thread,&attr,scan_thread, NULL)) != 0) {
+ ast_log(LOG_WARNING, "Unable to create thread :( (returned error: %d)\n", ret);
return -1;
}
return 0;