|
From: <ren...@us...> - 2007-10-25 19:36:16
|
Revision: 879
http://gmyth.svn.sourceforge.net/gmyth/?rev=879&view=rev
Author: renatofilho
Date: 2007-10-25 12:36:19 -0700 (Thu, 25 Oct 2007)
Log Message:
-----------
bug fixes
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-25 17:43:23 UTC (rev 878)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-25 19:36:19 UTC (rev 879)
@@ -217,6 +217,9 @@
GError **error)
{
GMythDbusServerPrivate *priv;
+
+ g_debug ("%s:%d", __FUNCTION__, __LINE__);
+
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
if (priv->myth_backend)
@@ -237,6 +240,9 @@
GError **error)
{
GMythDbusServerPrivate *priv;
+
+ g_debug ("%s:%d", __FUNCTION__, __LINE__);
+
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
if (priv->myth_backend)
@@ -251,6 +257,9 @@
GError **error)
{
GMythDbusServerPrivate *priv;
+
+ g_debug ("%s:%d", __FUNCTION__, __LINE__);
+
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
if (priv->myth_epg)
@@ -340,8 +349,10 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend != NULL, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+
ch_type = GMYTH_DBUS_CHANNEL_G_TYPE;
ch_info = gmyth_epg_get_channel_info (priv->myth_epg, channel_id);
@@ -375,9 +386,11 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend != NULL, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+ lst = NULL;
len = gmyth_epg_get_channel_list (priv->myth_epg, &lst);
*channels = g_ptr_array_sized_new (len);
@@ -436,7 +449,8 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_epg (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
g_time_val_from_iso8601 (start_time, &start_time_val);
g_time_val_from_iso8601 (end_time, &end_time_val);
@@ -534,8 +548,10 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+
record_type = GMYTH_DBUS_RECORD_G_TYPE;
record_info = gmyth_scheduler_get_recorded_info (priv->myth_scheduler,
@@ -576,7 +592,8 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
len = gmyth_scheduler_get_recorded_list (priv->myth_scheduler,
@@ -622,7 +639,8 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
len = gmyth_scheduler_get_schedule_list (priv->myth_scheduler,
@@ -685,6 +703,8 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
+ file_transfer = NULL;
+
g_return_val_if_fail (priv->myth_backend, FALSE);
if (!gmyth_util_file_exists (priv->myth_backend, uri))
@@ -783,7 +803,8 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
ret = gmyth_scheduler_stop_recording (priv->myth_scheduler,
channel_id);
@@ -846,9 +867,11 @@
*schedule_id = 0;
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+
g_time_val_from_iso8601 (start_time, &start_vtime);
g_time_val_from_iso8601 (end_time, &end_vtime);
sch_info = gmyth_dbus_server_new_schedule_info (description,
@@ -931,8 +954,10 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+
g_time_val_from_iso8601 (start_time, &start_vtime);
g_time_val_from_iso8601 (end_time, &end_vtime);
@@ -969,8 +994,10 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
g_return_val_if_fail (priv->myth_backend, FALSE);
- g_return_val_if_fail (gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)), FALSE);
+ if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
+ return FALSE;
+
return gmyth_scheduler_delete_schedule (priv->myth_scheduler, schedule_id);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-10-25 21:08:18
|
Revision: 880
http://gmyth.svn.sourceforge.net/gmyth/?rev=880&view=rev
Author: renatofilho
Date: 2007-10-25 14:08:12 -0700 (Thu, 25 Oct 2007)
Log Message:
-----------
fixed connection bug
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-25 19:36:19 UTC (rev 879)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-25 21:08:12 UTC (rev 880)
@@ -40,6 +40,7 @@
struct _GMythDbusServerPrivate
{
GMythBackendInfo *myth_backend;
+ gboolean connected;
GMythEPG *myth_epg;
GMythScheduler *myth_scheduler;
};
@@ -172,6 +173,9 @@
GMythDbusServerPrivate *priv;
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (server);
+ if (!priv->connected)
+ return FALSE;
+
if (!priv->myth_epg)
{
priv->myth_epg = gmyth_epg_new();
@@ -192,6 +196,9 @@
GMythDbusServerPrivate *priv;
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (server);
+ if (!priv->connected)
+ return FALSE;
+
if (!priv->myth_scheduler)
{
priv->myth_scheduler = gmyth_scheduler_new ();
@@ -216,6 +223,7 @@
gboolean *result,
GError **error)
{
+ GMythSocket *s;
GMythDbusServerPrivate *priv;
g_debug ("%s:%d", __FUNCTION__, __LINE__);
@@ -230,8 +238,23 @@
password,
MYTH_DEFAULT_DB,
port);
- *result = TRUE;
- return TRUE;
+
+ s = gmyth_backend_info_get_connected_socket (priv->myth_backend);
+ if (s)
+ {
+ g_object_unref (s);
+ *result = TRUE;
+ }
+ else
+ {
+ g_debug ("FAIL TO CONNECT");
+ g_object_unref (priv->myth_backend);
+ priv->myth_backend = NULL;
+ *result = FALSE;
+ }
+
+ priv->connected = *result;
+ return *result;
}
static gboolean
@@ -591,7 +614,7 @@
g_debug ("%s:%d", __FUNCTION__, __LINE__);
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
- g_return_val_if_fail (priv->myth_backend, FALSE);
+ g_return_val_if_fail (priv->myth_backend != NULL, FALSE);
if (!gmyth_dbus_server_connect_scheduler (GMYTH_DBUS_SERVER (obj)))
return FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-10-26 22:03:18
|
Revision: 882
http://gmyth.svn.sourceforge.net/gmyth/?rev=882&view=rev
Author: renatofilho
Date: 2007-10-26 15:03:22 -0700 (Fri, 26 Oct 2007)
Log Message:
-----------
force connecte always connect called
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-26 21:09:47 UTC (rev 881)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-26 22:03:22 UTC (rev 882)
@@ -231,7 +231,9 @@
priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
if (priv->myth_backend)
- return TRUE;
+ {
+ gmyth_dbus_server_disconnect (obj, NULL);
+ }
priv->myth_backend = gmyth_backend_info_new_full (host,
user,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2007-10-30 14:08:04
|
Revision: 885
http://gmyth.svn.sourceforge.net/gmyth/?rev=885&view=rev
Author: renatofilho
Date: 2007-10-30 07:08:04 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
fixed bug on connect function
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-29 20:13:33 UTC (rev 884)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2007-10-30 14:08:04 UTC (rev 885)
@@ -81,7 +81,6 @@
guint port,
const gchar *user,
const gchar *password,
- gboolean *result,
GError **error);
static gboolean gmyth_dbus_server_get_channel_list (GObject *obj,
GPtrArray **channels,
@@ -234,6 +233,7 @@
_("Fail to connect with EPG"));
return FALSE;
+
}
}
@@ -284,7 +284,6 @@
guint port,
const gchar *user,
const gchar *password,
- gboolean *result,
GError **error)
{
GMythSocket *s;
@@ -296,7 +295,7 @@
if (priv->connected)
{
- gmyth_dbus_server_internal_disconnect (obj, error);
+ gmyth_dbus_server_internal_disconnect (obj, NULL);
}
priv->myth_backend = gmyth_backend_info_new_full (host,
@@ -308,14 +307,14 @@
s = gmyth_backend_info_get_connected_socket (priv->myth_backend);
if (s)
{
+ priv->connected = TRUE;
g_object_unref (s);
- *result = TRUE;
}
else
{
+ priv->connected = FALSE;
g_object_unref (priv->myth_backend);
priv->myth_backend = NULL;
- *result = FALSE;
g_set_error (error,
GMYTH_DBUS_ERROR,
@@ -323,8 +322,7 @@
_("Fail to connect with backend"));
}
- priv->connected = *result;
- return *result;
+ return priv->connected;
}
static gboolean
@@ -349,9 +347,14 @@
gmyth_dbus_server_disconnect (GObject *obj,
GError **error)
{
+ GMythDbusServerPrivate *priv;
- gmyth_dbus_server_internal_disconnect (obj, error);
- g_signal_emit (obj, signals[DISCONNECTED], 0);
+ priv = GMYTH_DBUS_SERVER_GET_PRIVATE (obj);
+ if (priv->connected)
+ {
+ gmyth_dbus_server_internal_disconnect (obj, error);
+ g_signal_emit (obj, signals[DISCONNECTED], 0);
+ }
return TRUE;
}
@@ -384,6 +387,8 @@
g_object_unref (priv->myth_scheduler);
priv->myth_scheduler = NULL;
}
+
+ priv->connected = FALSE;
}
static gboolean
@@ -433,7 +438,7 @@
GMYTH_DBUS_ERROR,
GMYTH_DBUS_ERROR_MYTHTV,
_("Fail to get MythTv details"));
- }
+}
g_object_unref (socket);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-01-29 18:40:38
|
Revision: 902
http://gmyth.svn.sourceforge.net/gmyth/?rev=902&view=rev
Author: renatofilho
Date: 2008-01-29 10:40:32 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
fixed var names
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-01-29 18:40:18 UTC (rev 901)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-01-29 18:40:32 UTC (rev 902)
@@ -633,7 +633,7 @@
end_str = g_time_val_to_iso8601 (data->endts);
dbus_g_type_struct_set (&program,
- 0, data->xx_channel_id,
+ 0, data->channel_id,
1, start_str,
2, end_str,
3, data->title->str,
@@ -666,8 +666,8 @@
dbus_g_type_struct_set (val,
0, info->record_id,
- 1, info->xx_program_id->str,
- 2, info->xx_channel_id,
+ 1, info->program_id->str,
+ 2, info->channel_id,
3, start_str,
4, end_str,
5, info->title->str,
@@ -824,8 +824,8 @@
dbus_g_type_struct_set (&schedule,
0, data->schedule_id,
- 1, data->xx_program_id->str,
- 2, data->xx_channel_id,
+ 1, data->program_id->str,
+ 2, data->channel_id,
3, start_str_time,
4, end_str_time,
5, data->title->str,
@@ -1025,8 +1025,8 @@
/* record_id == -1 for generating a new id */
new_sched_info->schedule_id = -1;
- new_sched_info->xx_channel_id = channel_id;
- new_sched_info->xx_program_id = g_string_new (program_id);
+ new_sched_info->channel_id = channel_id;
+ new_sched_info->program_id = g_string_new (program_id);
new_sched_info->start_time = g_new0 (GTimeVal, 1);
*new_sched_info->start_time = *start_vtime;
new_sched_info->end_time = g_new0 (GTimeVal, 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-02-28 08:10:50
|
Revision: 941
http://gmyth.svn.sourceforge.net/gmyth/?rev=941&view=rev
Author: melunko
Date: 2008-02-28 00:10:55 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
gmyth-dbus-server mysql connection timeout increased to 10seconds
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-02-27 11:00:07 UTC (rev 940)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-02-28 08:10:55 UTC (rev 941)
@@ -1309,7 +1309,7 @@
binfo = gmyth_backend_info_new_full (host, user, password, MYTH_DEFAULT_DB, port);
- ret = gmyth_query_connect_with_timeout (query, binfo, 2 /*seconds*/);
+ ret = gmyth_query_connect_with_timeout (query, binfo, 10 /*seconds*/);
gmyth_query_disconnect (query);
g_object_unref (query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|