# HG changeset patch
# User renatofilho
# Date 1183495539 -3600
# Node ID b4480dd29fc8cdd4aa86a9e480c61fce66857802
# Parent 800e6485ad15471a966b5ec4eee81022224b5d62
[svn r777] bug fixed
diff -r 800e6485ad15 -r b4480dd29fc8 gmyth/src/gmyth_backendinfo.c
--- a/gmyth/src/gmyth_backendinfo.c Tue Jul 03 21:26:55 2007 +0100
+++ b/gmyth/src/gmyth_backendinfo.c Tue Jul 03 21:45:39 2007 +0100
@@ -350,13 +350,14 @@
if (backend_info->sock == NULL) {
gboolean res;
backend_info->sock = gmyth_socket_new ();
- res = gmyth_socket_connect_to_backend (socket,
+ res = gmyth_socket_connect_to_backend (backend_info->sock,
backend_info->hostname,
backend_info->port,
TRUE);
if (res == FALSE) {
g_object_unref (backend_info->sock);
backend_info->sock = NULL;
+ return NULL;
}
}
diff -r 800e6485ad15 -r b4480dd29fc8 gmyth/src/gmyth_scheduler.c
--- a/gmyth/src/gmyth_scheduler.c Tue Jul 03 21:26:55 2007 +0100
+++ b/gmyth/src/gmyth_scheduler.c Tue Jul 03 21:45:39 2007 +0100
@@ -2,14 +2,14 @@
* GMyth Library
*
* @file gmyth/gmyth_scheduler.c
- *
+ *
* @brief
The scheduler encapsulates all functions for browsing, scheduling
* and modifying the recorded content.
*
* Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
* @author Alexsandro Jose Virginio dos Santos
*
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -347,9 +347,9 @@
return (*recorded_list == NULL) ? 0 : g_list_length(*recorded_list);
}
-RecordedInfo*
+RecordedInfo*
gmyth_scheduler_get_recorded_info (GMythScheduler *scheduler,
- gint record_id)
+ const gchar* basename)
{
RecordedInfo *record = NULL;
MYSQL_RES *msql_res;
@@ -361,7 +361,7 @@
"SELECT recordid,programid,chanid,starttime,progstart,"
"endtime,progend,title,subtitle,description,category,"
"filesize,basename FROM recorded "
- "WHERE recgroup != 'LiveTV' AND recordid = %d", record_id);
+ "WHERE recgroup != 'LiveTV' AND basename = '%s'", basename);
if (scheduler->msqlquery == NULL) {
g_warning("[%s] Scheduler db connection not initialized",
diff -r 800e6485ad15 -r b4480dd29fc8 gmyth/src/gmyth_scheduler.h
--- a/gmyth/src/gmyth_scheduler.h Tue Jul 03 21:26:55 2007 +0100
+++ b/gmyth/src/gmyth_scheduler.h Tue Jul 03 21:45:39 2007 +0100
@@ -2,14 +2,14 @@
* GMyth Library
*
* @file gmyth/gmyth_scheduler.h
- *
+ *
* @brief The scheduler encapsulates all functions for browsing, scheduling
* and modifying the recorded content.
*
* Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
* @author Alexsandro Jose Virginio dos Santos
*
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -47,13 +47,6 @@
struct _GMythSchedulerClass {
GObjectClass parent_class;
-
- /*
- * callbacks
- */
- /*
- * no one for now
- */
};
struct _GMythScheduler {
@@ -144,7 +137,7 @@
gint gmyth_scheduler_get_recorded_list (GMythScheduler * scheduler,
GList ** rec_list);
RecordedInfo* gmyth_scheduler_get_recorded_info (GMythScheduler *scheduler,
- gint record_id);
+ const char *basename);
GMythProgramInfo *gmyth_scheduler_get_recorded (GMythScheduler * scheduler,
GString * channel,
GTimeVal * starttime);