]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/libstack/opensrf.c
clark knows how to use custom widget filter code now
[Evergreen.git] / OpenSRF / src / libstack / opensrf.c
1 #include "osrf_system.h"
2 #include "osrf_hash.h"
3 #include "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         fprintf(stderr, "Loading OpenSRF host %s with bootstrap config %s "
13                         "and config context %s\n", argv[1], argv[2], argv[3] );
14
15         /* these must be strdup'ed because init_proc_title / set_proc_title 
16                 are evil and overwrite the argv memory */
17         char* host              = strdup( argv[1] );
18         char* config    = strdup( argv[2] );
19         char* context   = strdup( argv[3] );
20
21         init_proc_title( argc, argv );
22         set_proc_title( "OpenSRF System" );
23
24         osrfSystemBootstrap( host, config, context );
25
26         free(host);
27         free(config);
28         free(context);
29
30         return 0;
31 }
32
33