]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/libopensrf/opensrf.c
removed some initial (non-error) stderr logging.
[OpenSRF.git] / src / libopensrf / opensrf.c
1 #include <opensrf/osrf_system.h>
2 //#include <opensrf/osrf_hash.h>
3 //#include <opensrf/osrf_list.h>
4
5 int main( int argc, char* argv[] ) {
6
7         if( argc < 4 ) {
8                 fprintf(stderr, "Usage: %s <host> <bootstrap_config> <config_context>\n", argv[0]);
9                 return 1;
10         }
11
12         /* these must be strdup'ed because init_proc_title / set_proc_title 
13                 are evil and overwrite the argv memory */
14         char* host              = strdup( argv[1] );
15         char* config    = strdup( argv[2] );
16         char* context   = strdup( argv[3] );
17
18         init_proc_title( argc, argv );
19         set_proc_title( "OpenSRF System-C" );
20
21         int ret = osrfSystemBootstrap( host, config, context );
22
23         if (ret != 0) {
24                 osrfLogError(
25                         OSRF_LOG_MARK,
26                         "Server Loop returned an error condition, exiting with %d",
27                         ret
28                 );
29         }
30
31
32         free(host);
33         free(config);
34         free(context);
35
36         return ret;
37 }
38
39