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