#include "osrf_application.h"
#include "osrf_prefork.h"
-char* __osrfSystemHostname = NULL;
-
void __osrfSystemSignalHandler( int sig );
transport_client* __osrfGlobalTransportClient;
int osrfSystemBootstrap( char* hostname, char* configfile, char* contextNode ) {
if( !(hostname && configfile && contextNode) ) return -1;
- __osrfSystemHostname = strdup(hostname);
-
/* first we grab the settings */
if(!osrfSystemBootstrapClientResc(configfile, contextNode, "settings_grabber" )) {
return fatal_handler("Unable to bootstrap");
transport_client* client = client_init( domain, iport, unixpath, 0 );
char* host;
- if(__osrfSystemHostname) host = __osrfSystemHostname;
- else host = getenv("HOSTNAME");
- if( host == NULL ) host = "";
+ host = getenv("HOSTNAME");
+ if(!host) host = "";
if(!resource) resource = "";
+
int len = strlen(resource) + 256;
char buf[len];
memset(buf,0,len);
- snprintf(buf, len - 1, "opensrf_%s_%s_%d", resource, host, getpid() );
+ snprintf(buf, len - 1, "%s_%s_%d", resource, host, getpid() );
if(client_connect( client, username, password, buf, 10, AUTH_DIGEST )) {
/* child nodes will leak the parents client... but we can't free