# HG changeset patch # User leo_sobral # Date 1161200327 -3600 # Node ID 6b9c77b9817ec2f51278fed206f4eedeeae56ee2 # Parent eb4a812d407364ce15556dca429602116fffcad2 [svn r33] disconnect bug resolved in gmyth_epg and gmyth_scheduler diff -r eb4a812d4073 -r 6b9c77b9817e gmyth/src/gmyth_epg.c --- a/gmyth/src/gmyth_epg.c Tue Oct 17 01:03:06 2006 +0100 +++ b/gmyth/src/gmyth_epg.c Wed Oct 18 20:38:47 2006 +0100 @@ -100,8 +100,8 @@ assert(gmyth_epg); if (gmyth_epg->sqlquery == NULL) { - g_warning ("[%s] GMythEPG not initialized", __FUNCTION__); - return FALSE; + g_warning ("[%s] GMythEPG db initializing", __FUNCTION__); + gmyth_epg->sqlquery = gmyth_query_new (); } if (!gmyth_query_connect(gmyth_epg->sqlquery)) { @@ -124,6 +124,7 @@ if (gmyth_epg->sqlquery != NULL) { g_object_unref (gmyth_epg->sqlquery); + gmyth_epg->sqlquery = NULL; } return TRUE; diff -r eb4a812d4073 -r 6b9c77b9817e gmyth/src/gmyth_scheduler.c --- a/gmyth/src/gmyth_scheduler.c Tue Oct 17 01:03:06 2006 +0100 +++ b/gmyth/src/gmyth_scheduler.c Wed Oct 18 20:38:47 2006 +0100 @@ -133,9 +133,9 @@ assert(scheduler); if (scheduler->msqlquery == NULL) { - g_warning ("[%s] MMythScheduler not initialized", __FUNCTION__); - return FALSE; - } + g_warning ("[%s] GMythScheduler db initializing", __FUNCTION__); + scheduler->msqlquery = gmyth_query_new (); + } if (!gmyth_query_connect(scheduler->msqlquery)) { g_warning ("[%s] Error while connecting to db", __FUNCTION__); diff -r eb4a812d4073 -r 6b9c77b9817e gmyth/src/gmyth_settings.h --- a/gmyth/src/gmyth_settings.h Tue Oct 17 01:03:06 2006 +0100 +++ b/gmyth/src/gmyth_settings.h Wed Oct 18 20:38:47 2006 +0100 @@ -34,13 +34,6 @@ #include -//#include -//#include -//#include -//#include -//#include -//#include - G_BEGIN_DECLS #define GMYTH_SETTINGS_TYPE (gmyth_settings_get_type ()) @@ -82,21 +75,31 @@ GType gmyth_settings_get_type (void); GMythSettings* gmyth_settings_new (void); -gboolean gmyth_settings_load_from_file (GMythSettings *gmyth_settings, GString *filename); + +gboolean gmyth_settings_load_from_file (GMythSettings *gmyth_settings, + GString *filename); gboolean gmyth_settings_load (GMythSettings *msettings); gboolean gmyth_settings_save (GMythSettings *gmyth_settings); GString* gmyth_settings_get_backend_hostname (GMythSettings *gmyth_settings); -void gmyth_settings_set_backend_hostname (GMythSettings *gmyth_settings, GString *new_hostname); +void gmyth_settings_set_backend_hostname (GMythSettings *gmyth_settings, + GString *new_hostname); + GString* gmyth_settings_get_username (GMythSettings *gmyth_settings); -void gmyth_settings_set_username (GMythSettings *gmyth_settings, GString *new_username); +void gmyth_settings_set_username (GMythSettings *gmyth_settings, + GString *new_username); + GString* gmyth_settings_get_password (GMythSettings *gmyth_settings); -void gmyth_settings_set_password (GMythSettings *gmyth_settings, GString *new_password); +void gmyth_settings_set_password (GMythSettings *gmyth_settings, + GString *new_password); + GString* gmyth_settings_get_dbname (GMythSettings *gmyth_settings); -void gmyth_settings_set_dbname (GMythSettings *gmyth_settings, GString *new_dbname); -int gmyth_settings_get_backend_port (GMythSettings *gmyth_settings); -void gmyth_settings_set_backend_port (GMythSettings *gmyth_settings, gint new_port); +void gmyth_settings_set_dbname (GMythSettings *gmyth_settings, + GString *new_dbname); +int gmyth_settings_get_backend_port (GMythSettings *gmyth_settings); +void gmyth_settings_set_backend_port (GMythSettings *gmyth_settings, + gint new_port); G_END_DECLS