[asterisk-commits] trunk - r7849 in /trunk: ./ pbx/pbx_spool.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jan 7 01:31:10 CST 2006


Author: tilghman
Date: Sat Jan  7 01:31:08 2006
New Revision: 7849

URL: http://svn.digium.com/view/asterisk?rev=7849&view=rev
Log:
Merged revisions 7848 via svnmerge from
/branches/1.2

Modified:
    trunk/   (props changed)
    trunk/pbx/pbx_spool.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jan  7 01:31:08 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7811,7813-7829,7831
+/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7811,7813-7829,7831,7848

Modified: trunk/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_spool.c?rev=7849&r1=7848&r2=7849&view=diff
==============================================================================
--- trunk/pbx/pbx_spool.c (original)
+++ trunk/pbx/pbx_spool.c Sat Jan  7 01:31:08 2006
@@ -288,10 +288,11 @@
 {
 	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 @@
 {
 	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 @@
 	}
 	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;



More information about the asterisk-commits mailing list