[svn r777] bug fixed trunk
authorrenatofilho
Tue Jul 03 21:45:39 2007 +0100 (2007-07-03)
branchtrunk
changeset 771b4480dd29fc8
parent 770 800e6485ad15
child 772 47de5c5976bf
[svn r777] bug fixed
gmyth/src/gmyth_backendinfo.c
gmyth/src/gmyth_scheduler.c
gmyth/src/gmyth_scheduler.h
     1.1 --- a/gmyth/src/gmyth_backendinfo.c	Tue Jul 03 21:26:55 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_backendinfo.c	Tue Jul 03 21:45:39 2007 +0100
     1.3 @@ -350,13 +350,14 @@
     1.4      if (backend_info->sock == NULL) {
     1.5          gboolean res;
     1.6          backend_info->sock = gmyth_socket_new ();
     1.7 -        res =  gmyth_socket_connect_to_backend (socket,
     1.8 +        res =  gmyth_socket_connect_to_backend (backend_info->sock,
     1.9                                                  backend_info->hostname,
    1.10                                                  backend_info->port,
    1.11                                                  TRUE);
    1.12          if (res == FALSE) {
    1.13              g_object_unref (backend_info->sock);
    1.14              backend_info->sock = NULL;
    1.15 +            return NULL;
    1.16          }
    1.17      }
    1.18  
     2.1 --- a/gmyth/src/gmyth_scheduler.c	Tue Jul 03 21:26:55 2007 +0100
     2.2 +++ b/gmyth/src/gmyth_scheduler.c	Tue Jul 03 21:45:39 2007 +0100
     2.3 @@ -2,14 +2,14 @@
     2.4   * GMyth Library
     2.5   *
     2.6   * @file gmyth/gmyth_scheduler.c
     2.7 - * 
     2.8 + *
     2.9   * @brief <p> The scheduler encapsulates all functions for browsing, scheduling
    2.10   * and modifying the recorded content.
    2.11   *
    2.12   * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    2.13   * @author Alexsandro Jose Virginio dos Santos <alexsandro.santos@indt.org.br>
    2.14   *
    2.15 - * 
    2.16 + *
    2.17   * This program is free software; you can redistribute it and/or modify
    2.18   * it under the terms of the GNU Lesser General Public License as published by
    2.19   * the Free Software Foundation; either version 2 of the License, or
    2.20 @@ -347,9 +347,9 @@
    2.21      return (*recorded_list == NULL) ? 0 : g_list_length(*recorded_list);
    2.22  }
    2.23  
    2.24 -RecordedInfo*   
    2.25 +RecordedInfo*
    2.26  gmyth_scheduler_get_recorded_info (GMythScheduler *scheduler,
    2.27 -                                   gint record_id)
    2.28 +                                   const gchar* basename)
    2.29  {
    2.30      RecordedInfo   *record = NULL;
    2.31      MYSQL_RES      *msql_res;
    2.32 @@ -361,7 +361,7 @@
    2.33                      "SELECT recordid,programid,chanid,starttime,progstart,"
    2.34                      "endtime,progend,title,subtitle,description,category,"
    2.35                      "filesize,basename FROM recorded "
    2.36 -                    "WHERE recgroup != 'LiveTV' AND recordid = %d", record_id);
    2.37 +                    "WHERE recgroup != 'LiveTV' AND basename = '%s'", basename);
    2.38  
    2.39      if (scheduler->msqlquery == NULL) {
    2.40          g_warning("[%s] Scheduler db connection not initialized", 
     3.1 --- a/gmyth/src/gmyth_scheduler.h	Tue Jul 03 21:26:55 2007 +0100
     3.2 +++ b/gmyth/src/gmyth_scheduler.h	Tue Jul 03 21:45:39 2007 +0100
     3.3 @@ -2,14 +2,14 @@
     3.4   * GMyth Library
     3.5   *
     3.6   * @file gmyth/gmyth_scheduler.h
     3.7 - * 
     3.8 + *
     3.9   * @brief <p> The scheduler encapsulates all functions for browsing, scheduling
    3.10   * and modifying the recorded content.
    3.11   *
    3.12   * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    3.13   * @author Alexsandro Jose Virginio dos Santos <alexsandro.santos@indt.org.br>
    3.14   *
    3.15 - * 
    3.16 + *
    3.17   * This program is free software; you can redistribute it and/or modify
    3.18   * it under the terms of the GNU Lesser General Public License as published by
    3.19   * the Free Software Foundation; either version 2 of the License, or
    3.20 @@ -47,13 +47,6 @@
    3.21  
    3.22  struct _GMythSchedulerClass {
    3.23      GObjectClass    parent_class;
    3.24 -
    3.25 -    /*
    3.26 -     * callbacks 
    3.27 -     */
    3.28 -    /*
    3.29 -     * no one for now 
    3.30 -     */
    3.31  };
    3.32  
    3.33  struct _GMythScheduler {
    3.34 @@ -144,7 +137,7 @@
    3.35  gint            gmyth_scheduler_get_recorded_list   (GMythScheduler * scheduler,
    3.36                                                       GList ** rec_list);
    3.37  RecordedInfo*   gmyth_scheduler_get_recorded_info   (GMythScheduler *scheduler,
    3.38 -                                                     gint record_id);
    3.39 +                                                     const char *basename);
    3.40  GMythProgramInfo *gmyth_scheduler_get_recorded      (GMythScheduler * scheduler,
    3.41                                                       GString * channel,
    3.42                                                       GTimeVal * starttime);