summaryrefslogtreecommitdiff
path: root/src/ivy.c
diff options
context:
space:
mode:
authorfcolin2010-12-21 16:22:59 +0000
committerfcolin2010-12-21 16:22:59 +0000
commit604b4ec8ea9f012af8c6529d142948deed6c0efb (patch)
tree790aeff9be935937e6d520baa3c77cc69f7f60f1 /src/ivy.c
parentd57a5c4a793cb263e8f8ee9d1d7f5ad39405eb9f (diff)
downloadivy-c-604b4ec8ea9f012af8c6529d142948deed6c0efb.zip
ivy-c-604b4ec8ea9f012af8c6529d142948deed6c0efb.tar.gz
ivy-c-604b4ec8ea9f012af8c6529d142948deed6c0efb.tar.bz2
ivy-c-604b4ec8ea9f012af8c6529d142948deed6c0efb.tar.xz
Local storage of readymessage and appname passed to IvyInit
Diffstat (limited to 'src/ivy.c')
-rw-r--r--src/ivy.c14
1 files changed, 11 insertions, 3 deletions
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 )
{