# HG changeset patch # User renatofilho # Date 1188850454 -3600 # Node ID 3539377c180754ef178588e855306ecf2b0967ee # Parent 6b3c7c0b32ad80a8bf40f203f4ea72cdb16dfe6a [svn r844] fixed livetv destructor diff -r 6b3c7c0b32ad -r 3539377c1807 gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Fri Aug 31 18:31:09 2007 +0100 +++ b/gmyth/src/gmyth_livetv.c Mon Sep 03 21:14:14 2007 +0100 @@ -391,7 +391,7 @@ * @return true if the LiveTV's recorder instance configuration * had been concluded succcesfully */ -static gboolean +static gboolean gmyth_livetv_setup_recorder_channel_name(GMythLiveTV * livetv, gchar * channel) { @@ -399,6 +399,8 @@ g_return_val_if_fail(livetv != NULL, FALSE); + g_mutex_lock(livetv->mutex); + if (livetv->socket == NULL) { livetv->socket = gmyth_socket_new(); /* @@ -417,8 +419,6 @@ } } - g_mutex_lock(livetv->mutex); - livetv->is_livetv = TRUE; livetv->local_hostname = gmyth_socket_get_local_hostname(); @@ -865,18 +865,18 @@ * @return the actual GMythFileTransfer instance, generated using the * data got from the actual program info. */ -GMythFile * +GMythFile* gmyth_livetv_create_file_transfer(GMythLiveTV * livetv) { // GMythURI* uri = NULL; if (NULL == livetv) - goto done; + return NULL; if (!livetv->setup_done) { gmyth_debug ("Error: You must do the LiveTV setup, just before generating the FileTransfer from LiveTV source!"); - goto done; + return NULL; } if (livetv->proginfo != NULL) @@ -936,19 +936,9 @@ g_object_ref(livetv->file); +done: g_mutex_unlock(livetv->mutex); - - /* - * Do some locking procedure with the Monitor Handler messages... - */ - - done: - /* - * if ( uri != NULL ) { g_object_unref( uri ); uri = NULL; } - */ - return livetv->file; - } /**