# HG changeset patch # User rosfran # Date 1170872978 0 # Node ID e0ae971dc16e16ca94ae5bab200734198c504dad # Parent 818deb9ae65d42630da61628711b675d65794459 [svn r332] Solve some g_object_unref faults and misusages. diff -r 818deb9ae65d -r e0ae971dc16e gmyth/src/gmyth_backendinfo.c --- a/gmyth/src/gmyth_backendinfo.c Wed Feb 07 00:03:05 2007 +0000 +++ b/gmyth/src/gmyth_backendinfo.c Wed Feb 07 18:29:38 2007 +0000 @@ -78,12 +78,13 @@ backend_info->db_name = NULL; backend_info->port = -1; +/* if ( backend_info->uri != NULL ) { g_object_unref(backend_info->uri); backend_info->uri = NULL; } - +*/ G_OBJECT_CLASS (gmyth_backend_info_parent_class)->dispose (object); } diff -r 818deb9ae65d -r e0ae971dc16e gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Wed Feb 07 00:03:05 2007 +0000 +++ b/gmyth/src/gmyth_livetv.c Wed Feb 07 18:29:38 2007 +0000 @@ -114,7 +114,7 @@ livetv->proginfo = NULL; } - if ( livetv->file_transfer != NULL ) { + if ( livetv->file_transfer != NULL && G_IS_OBJECT(livetv->file_transfer) ) { g_object_unref (livetv->file_transfer); livetv->file_transfer = NULL; } @@ -377,7 +377,7 @@ } /* if - changes the channel number */ - sleep (9); /* FIXME: this is evil (tpm) */ + sleep (6); /* FIXME: this is evil (tpm) */ } /* DEBUG message */ diff -r 818deb9ae65d -r e0ae971dc16e gmyth/src/gmyth_monitor_handler.c --- a/gmyth/src/gmyth_monitor_handler.c Wed Feb 07 00:03:05 2007 +0000 +++ b/gmyth/src/gmyth_monitor_handler.c Wed Feb 07 18:29:38 2007 +0000 @@ -164,16 +164,17 @@ if ( monitor->monitor_th != NULL ) { - g_thread_pool_free( monitor->monitor_th, TRUE, FALSE ); + g_thread_pool_free( monitor->monitor_th, TRUE, TRUE ); //g_thread_exit( monitor->monitor_th ); - if ( monitor->monitor_th != NULL ) - g_object_unref( monitor->monitor_th ); + /*if ( monitor->monitor_th != NULL ) + g_object_unref( monitor->monitor_th );*/ monitor->monitor_th = NULL; } if ( monitor->event_sock != NULL ) { - g_object_unref( monitor->event_sock ); + /* g_object_unref( monitor->event_sock ); */ + gmyth_socket_close_connection( monitor->event_sock ); monitor->event_sock = NULL; } diff -r 818deb9ae65d -r e0ae971dc16e gmyth/src/gmyth_recorder.c --- a/gmyth/src/gmyth_recorder.c Wed Feb 07 00:03:05 2007 +0000 +++ b/gmyth/src/gmyth_recorder.c Wed Feb 07 18:29:38 2007 +0000 @@ -428,12 +428,12 @@ tmp_str = gmyth_string_list_get_string (str_list, 0); if (tmp_str == NULL) { - g_warning ("[%s] SET_CHANNEL name request returned %s", __FUNCTION__, tmp_str->str ); + g_warning ("[%s] SET_CHANNEL name request returned NULL!", __FUNCTION__); return FALSE; } - if (g_ascii_strncasecmp (tmp_str->str, "ok", 2) || g_ascii_strtoull( tmp_str->str, NULL, 10 ) == 0 ) { - g_warning ("[%s] SET_CHANNEL name request returned %s", __FUNCTION__, tmp_str->str); + if (tmp_str!= NULL && g_ascii_strncasecmp (tmp_str->str, "ok", 2) /*|| g_ascii_strtoull( tmp_str->str, NULL, 10 ) == 0 */ ) { + g_warning ("XXXXXX[%s] SET_CHANNEL name request returned not ok", __FUNCTION__); g_object_unref (str_list); return FALSE; } diff -r 818deb9ae65d -r e0ae971dc16e gmyth/src/gmyth_socket.c --- a/gmyth/src/gmyth_socket.c Wed Feb 07 00:03:05 2007 +0000 +++ b/gmyth/src/gmyth_socket.c Wed Feb 07 18:29:38 2007 +0000 @@ -794,13 +794,15 @@ void gmyth_socket_close_connection (GMythSocket *gmyth_socket) { + if ( gmyth_socket->sd != -1 ) { close (gmyth_socket->sd); gmyth_socket->sd = -1; + } - if (gmyth_socket->sd_io_ch != NULL) { - g_io_channel_unref (gmyth_socket->sd_io_ch); - gmyth_socket->sd_io_ch = NULL; - } + if (gmyth_socket->sd_io_ch != NULL) { + g_io_channel_unref (gmyth_socket->sd_io_ch); + gmyth_socket->sd_io_ch = NULL; + } }