[svn r844] fixed livetv destructor trunk
authorrenatofilho
Mon Sep 03 21:14:14 2007 +0100 (2007-09-03)
branchtrunk
changeset 8383539377c1807
parent 837 6b3c7c0b32ad
child 839 5930595a2ae5
[svn r844] fixed livetv destructor
gmyth/src/gmyth_livetv.c
     1.1 --- a/gmyth/src/gmyth_livetv.c	Fri Aug 31 18:31:09 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_livetv.c	Mon Sep 03 21:14:14 2007 +0100
     1.3 @@ -391,7 +391,7 @@
     1.4   * @return <code>true</code> if the LiveTV's recorder instance configuration 
     1.5   * 				had been concluded succcesfully 
     1.6   */
     1.7 -static          gboolean
     1.8 +static gboolean
     1.9  gmyth_livetv_setup_recorder_channel_name(GMythLiveTV * livetv,
    1.10                                           gchar * channel)
    1.11  {
    1.12 @@ -399,6 +399,8 @@
    1.13  
    1.14      g_return_val_if_fail(livetv != NULL, FALSE);
    1.15  
    1.16 +    g_mutex_lock(livetv->mutex);
    1.17 +
    1.18      if (livetv->socket == NULL) {
    1.19          livetv->socket = gmyth_socket_new();
    1.20          /*
    1.21 @@ -417,8 +419,6 @@
    1.22          }
    1.23      }
    1.24  
    1.25 -    g_mutex_lock(livetv->mutex);
    1.26 -
    1.27      livetv->is_livetv = TRUE;
    1.28  
    1.29      livetv->local_hostname = gmyth_socket_get_local_hostname();
    1.30 @@ -865,18 +865,18 @@
    1.31   * @return the actual GMythFileTransfer instance, generated using the
    1.32   * 		data got from the actual program info.
    1.33   */
    1.34 -GMythFile      *
    1.35 +GMythFile*
    1.36  gmyth_livetv_create_file_transfer(GMythLiveTV * livetv)
    1.37  {
    1.38      // GMythURI* uri = NULL;
    1.39  
    1.40      if (NULL == livetv)
    1.41 -        goto done;
    1.42 +        return NULL;
    1.43  
    1.44      if (!livetv->setup_done) {
    1.45          gmyth_debug
    1.46              ("Error: You must do the LiveTV setup, just before generating the FileTransfer from LiveTV source!");
    1.47 -        goto done;
    1.48 +        return NULL;
    1.49      }
    1.50  
    1.51      if (livetv->proginfo != NULL)
    1.52 @@ -936,19 +936,9 @@
    1.53  
    1.54      g_object_ref(livetv->file);
    1.55  
    1.56 +done:
    1.57      g_mutex_unlock(livetv->mutex);
    1.58 -
    1.59 -    /*
    1.60 -     * Do some locking procedure with the Monitor Handler messages... 
    1.61 -     */
    1.62 -
    1.63 -  done:
    1.64 -    /*
    1.65 -     * if ( uri != NULL ) { g_object_unref( uri ); uri = NULL; } 
    1.66 -     */
    1.67 -
    1.68      return livetv->file;
    1.69 -
    1.70  }
    1.71  
    1.72  /**