From 604b4ec8ea9f012af8c6529d142948deed6c0efb Mon Sep 17 00:00:00 2001 From: fcolin Date: Tue, 21 Dec 2010 16:22:59 +0000 Subject: Local storage of readymessage and appname passed to IvyInit --- src/ivy.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/ivy.c') diff --git a/src/ivy.c b/src/ivy.c index 1074974..672d688 100644 --- a/src/ivy.c +++ b/src/ivy.c @@ -895,16 +895,24 @@ void IvyInit (const char *appname, const char *ready, ) { SocketInit(); - - ApplicationName = appname; + if ( appname ) + ApplicationName = strdup(appname); application_callback = callback; application_user_data = data; application_die_callback = die_callback; application_die_user_data = die_data; - ready_message = ready; + if ( ready ) + ready_message = strdup(ready); if ( getenv( "IVY_DEBUG_BINARY" )) debug_binary_msg = 1; } +void IvyTerminate() +{ + if ( ApplicationName ) + free( ApplicationName ); + if ( ready_message ) + free( ready_message ); +} void IvySetBindCallback( IvyBindCallback bind_callback, void *bind_data ) { -- cgit v1.1