Capturing the return value of the bootstrap call and emitting a message when encounte...
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 12 Jun 2007 01:15:55 +0000 (01:15 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 12 Jun 2007 01:15:55 +0000 (01:15 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@941 9efc2488-bf62-4759-914b-345cdb29e865

src/libstack/opensrf.c

index 2277eb4..9291930 100644 (file)
@@ -21,13 +21,22 @@ int main( int argc, char* argv[] ) {
        init_proc_title( argc, argv );
        set_proc_title( "OpenSRF System-C" );
 
-       osrfSystemBootstrap( host, config, context );
+       int ret = osrfSystemBootstrap( host, config, context );
+
+       if (ret != 0) {
+               osrfLogError(
+                       OSRF_LOG_MARK,
+                       "Server Loop returned an error condition, exiting with %d",
+                       ret
+               );
+       }
+
 
        free(host);
        free(config);
        free(context);
 
-       return 0;
+       return ret;
 }