[svn r229] Memory usage cleaning-up. trunk
authorrosfran
Tue Dec 19 19:48:04 2006 +0000 (2006-12-19)
branchtrunk
changeset 2280c4b132db3e7
parent 227 899d76d6cfc4
child 229 5ed97410d052
[svn r229] Memory usage cleaning-up.
gmyth/src/gmyth_monitor_handler.c
gmyth/src/gmyth_socket.c
     1.1 --- a/gmyth/src/gmyth_monitor_handler.c	Tue Dec 19 19:46:07 2006 +0000
     1.2 +++ b/gmyth/src/gmyth_monitor_handler.c	Tue Dec 19 19:48:04 2006 +0000
     1.3 @@ -164,6 +164,8 @@
     1.4    {
     1.5    	//g_thread_exit( monitor->monitor_th, TRUE, FALSE );
     1.6    	g_thread_exit( monitor->monitor_th );
     1.7 +  	if ( monitor->monitor_th != NULL )
     1.8 +  		g_object_unref( monitor->monitor_th );
     1.9    	monitor->monitor_th = NULL;
    1.10    }
    1.11  	
    1.12 @@ -543,7 +545,7 @@
    1.13  	gboolean *ret = g_new0( gboolean, 1 ); 
    1.14  	*ret = TRUE;	
    1.15  	
    1.16 -	if (!g_thread_supported () ) 	g_thread_init (NULL);
    1.17 +	/*if (!g_thread_supported () ) 	g_thread_init (NULL);*/
    1.18  	
    1.19    monitor->monitor_th = g_thread_create( (GThreadFunc)gmyth_monitor_handler_listener, 
    1.20    					monitor, TRUE, NULL );
     2.1 --- a/gmyth/src/gmyth_socket.c	Tue Dec 19 19:46:07 2006 +0000
     2.2 +++ b/gmyth/src/gmyth_socket.c	Tue Dec 19 19:48:04 2006 +0000
     2.3 @@ -116,7 +116,7 @@
     2.4      gchar *portStr = NULL;
     2.5      gint errorn = EADDRNOTAVAIL;
     2.6   
     2.7 -    g_return_val_if_fail (addr != NULL, -1);
     2.8 +    g_return_val_if_fail ( addr != NULL, -1 );
     2.9  
    2.10      /* hints = g_malloc0 ( sizeof(struct addrinfo) ); */
    2.11      memset ( &hints, 0, sizeof(struct addrinfo) );
    2.12 @@ -125,7 +125,7 @@
    2.13      /* hints.ai_flags = AI_NUMERICHOST; */
    2.14      
    2.15      if ( port != -1 )	
    2.16 -        portStr = g_strdup_printf ("%d", port);
    2.17 +        portStr = g_strdup_printf ( "%d", port );
    2.18      else
    2.19  				portStr = NULL;
    2.20