[Opensrf-commits] r985 - trunk/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jun 29 10:10:03 EDT 2007


Author: miker
Date: 2007-06-29 10:07:01 -0400 (Fri, 29 Jun 2007)
New Revision: 985

Modified:
   trunk/src/libopensrf/osrf_prefork.c
Log:
test for failed forker creation before touching struct members

Modified: trunk/src/libopensrf/osrf_prefork.c
===================================================================
--- trunk/src/libopensrf/osrf_prefork.c	2007-06-29 07:21:21 UTC (rev 984)
+++ trunk/src/libopensrf/osrf_prefork.c	2007-06-29 14:07:01 UTC (rev 985)
@@ -69,14 +69,14 @@
 	prefork_simple* forker = prefork_simple_init(
 		osrfSystemGetTransportClient(), maxr, minc, maxc);
 
-	forker->appname = strdup(appname);
-	forker->keepalive	= kalive;
-
 	if(forker == NULL) {
 		osrfLogError( OSRF_LOG_MARK, "osrf_prefork_run() failed to create prefork_simple object");
 		return -1;
 	}
 
+	forker->appname = strdup(appname);
+	forker->keepalive	= kalive;
+
 	prefork_launch_children(forker);
 
 	osrf_prefork_register_routers(appname);



More information about the opensrf-commits mailing list