1.1 --- a/gmyth/src/gmyth_backendinfo.c Mon Dec 04 22:01:41 2006 +0000
1.2 +++ b/gmyth/src/gmyth_backendinfo.c Mon Dec 04 22:10:40 2006 +0000
1.3 @@ -177,7 +177,7 @@
1.4 backend_info->port = port;
1.5 }
1.6
1.7 -gchar*
1.8 +const gchar*
1.9 gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info)
1.10 {
1.11 g_return_val_if_fail (backend_info != NULL, NULL);
1.12 @@ -185,7 +185,7 @@
1.13 return backend_info->hostname;
1.14 }
1.15
1.16 -gchar*
1.17 +const gchar*
1.18 gmyth_backend_info_get_username (GMythBackendInfo *backend_info)
1.19 {
1.20 g_return_val_if_fail (backend_info != NULL, NULL);
1.21 @@ -193,7 +193,7 @@
1.22 return backend_info->username;
1.23 }
1.24
1.25 -gchar*
1.26 +const gchar*
1.27 gmyth_backend_info_get_password (GMythBackendInfo *backend_info)
1.28 {
1.29 g_return_val_if_fail (backend_info != NULL, NULL);
1.30 @@ -201,7 +201,7 @@
1.31 return backend_info->password;
1.32 }
1.33
1.34 -gchar*
1.35 +const gchar*
1.36 gmyth_backend_info_get_db_name (GMythBackendInfo *backend_info)
1.37 {
1.38 g_return_val_if_fail (backend_info != NULL, NULL);
2.1 --- a/gmyth/src/gmyth_backendinfo.h Mon Dec 04 22:01:41 2006 +0000
2.2 +++ b/gmyth/src/gmyth_backendinfo.h Mon Dec 04 22:10:40 2006 +0000
2.3 @@ -63,27 +63,31 @@
2.4 };
2.5
2.6
2.7 -GType gmyth_backend_info_get_type (void);
2.8 -
2.9 -GMythBackendInfo* gmyth_backend_info_new ();
2.10 -GMythBackendInfo* gmyth_backend_info_new_full (
2.11 - const gchar *hostname, const gchar *username, const gchar *password,
2.12 - const gchar *db_name, gint port);
2.13 -GMythBackendInfo* gmyth_backend_info_new_with_uri (const gchar *uri_str );
2.14 -
2.15 -void gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, const gchar *hostname);
2.16 -void gmyth_backend_info_set_username (GMythBackendInfo *backend_info, const gchar *username);
2.17 -void gmyth_backend_info_set_password (GMythBackendInfo *backend_info, const gchar *password);
2.18 -void gmyth_backend_info_set_db_name (GMythBackendInfo *backend_info, const gchar *db_name);
2.19 -void gmyth_backend_info_set_port (GMythBackendInfo *backend_info, gint port);
2.20 -void gmyth_backend_info_set_path (GMythBackendInfo *backend_info, const gchar *path);
2.21 -
2.22 -gchar* gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
2.23 -gchar* gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
2.24 -gchar* gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
2.25 -gchar* gmyth_backend_info_get_db_name (GMythBackendInfo *backend_info);
2.26 -gint gmyth_backend_info_get_port (GMythBackendInfo *backend_info);
2.27 -gchar* gmyth_backend_info_get_path (GMythBackendInfo *backend_info);
2.28 +GType gmyth_backend_info_get_type (void);
2.29 +GMythBackendInfo* gmyth_backend_info_new (void);
2.30 +GMythBackendInfo* gmyth_backend_info_new_full (const gchar *hostname,
2.31 + const gchar *username,
2.32 + const gchar *password,
2.33 + const gchar *db_name,
2.34 + gint port);
2.35 +GMythBackendInfo* gmyth_backend_info_new_with_uri (const gchar *uri_str);
2.36 +void gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info,
2.37 + const gchar *hostname);
2.38 +void gmyth_backend_info_set_username (GMythBackendInfo *backend_info,
2.39 + const gchar *username);
2.40 +void gmyth_backend_info_set_password (GMythBackendInfo *backend_info,
2.41 + const gchar *password);
2.42 +void gmyth_backend_info_set_db_name (GMythBackendInfo *backend_info,
2.43 + const gchar *db_name);
2.44 +void gmyth_backend_info_set_port (GMythBackendInfo *backend_info,
2.45 + gint port);
2.46 +void gmyth_backend_info_set_path (GMythBackendInfo *backend_info,
2.47 + const gchar *path);
2.48 +const gchar* gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
2.49 +const gchar* gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
2.50 +const gchar* gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
2.51 +const gchar* gmyth_backend_info_get_db_name (GMythBackendInfo *backend_info);
2.52 +gint gmyth_backend_info_get_port (GMythBackendInfo *backend_info);
2.53
2.54 G_END_DECLS
2.55
3.1 --- a/gmyth/src/gmyth_file_transfer.c Mon Dec 04 22:01:41 2006 +0000
3.2 +++ b/gmyth/src/gmyth_file_transfer.c Mon Dec 04 22:10:40 2006 +0000
3.3 @@ -245,7 +245,6 @@
3.4 GString *base_str = NULL;
3.5 GString *hostname = NULL;
3.6 GMythStringList *strlist = NULL;
3.7 - gchar *path_dir = NULL;
3.8 gboolean ret = TRUE;
3.9
3.10 g_return_val_if_fail (transfer != NULL, FALSE );
3.11 @@ -253,8 +252,6 @@
3.12 g_return_val_if_fail (transfer->port > 0, FALSE);
3.13
3.14 base_str = g_string_new ("");
3.15 - path_dir = ( transfer->filename != NULL ? transfer->filename :
3.16 - gmyth_backend_info_get_path( transfer->backend_info ) );
3.17
3.18 /* Creates the control socket */
3.19 if (transfer->control_sock != NULL) {
3.20 @@ -291,7 +288,6 @@
3.21 g_string_printf( base_str, "ANN FileTransfer %s", hostname->str);
3.22
3.23 gmyth_string_list_append_string (strlist, base_str );
3.24 - gmyth_string_list_append_char_array (strlist, path_dir );
3.25
3.26 gmyth_socket_write_stringlist (transfer->sock, strlist );
3.27 gmyth_socket_read_stringlist (transfer->sock, strlist );
4.1 --- a/gmyth/src/gmyth_tvchain.c Mon Dec 04 22:01:41 2006 +0000
4.2 +++ b/gmyth/src/gmyth_tvchain.c Mon Dec 04 22:10:40 2006 +0000
4.3 @@ -114,7 +114,7 @@
4.4 gboolean
4.5 gmyth_tvchain_initialize (GMythTVChain *tvchain, GMythBackendInfo *backend_info)
4.6 {
4.7 - char *hostname;
4.8 + const char *hostname;
4.9
4.10 assert (tvchain);
4.11 g_return_val_if_fail (backend_info != NULL, FALSE);
4.12 @@ -125,21 +125,21 @@
4.13 hostname = gmyth_backend_info_get_hostname (backend_info);
4.14
4.15 if (tvchain->tvchain_id == NULL) {
4.16 - GString *isodate;
4.17 - time_t cur_time;
4.18 + GString *isodate;
4.19 + time_t cur_time;
4.20
4.21 - time(&cur_time);
4.22 - isodate = gmyth_util_time_to_isoformat (cur_time);
4.23 + time(&cur_time);
4.24 + isodate = gmyth_util_time_to_isoformat (cur_time);
4.25
4.26 - tvchain->tvchain_id = g_string_sized_new (7 + strlen (hostname) + isodate->len);
4.27 - g_string_printf(tvchain->tvchain_id,
4.28 - "live-%s-%s", hostname, isodate->str);
4.29 + tvchain->tvchain_id = g_string_sized_new (7 + strlen (hostname) + isodate->len);
4.30 + g_string_printf(tvchain->tvchain_id,
4.31 + "live-%s-%s", hostname, isodate->str);
4.32
4.33 - gmyth_debug ("[%s] tv_chain_id: %s", __FUNCTION__, tvchain->tvchain_id->str);
4.34 + gmyth_debug ("[%s] tv_chain_id: %s", __FUNCTION__, tvchain->tvchain_id->str);
4.35
4.36 - g_string_free(isodate, TRUE);
4.37 + g_string_free(isodate, TRUE);
4.38 } else {
4.39 - g_warning ("[%s] TVchain already initialized", __FUNCTION__);
4.40 + g_warning ("[%s] TVchain already initialized", __FUNCTION__);
4.41 }
4.42
4.43 return TRUE;
4.44 @@ -167,11 +167,10 @@
4.45 gmyth_tvchain_reload_all (GMythTVChain *tvchain)
4.46 {
4.47 MYSQL_ROW msql_row;
4.48 - MYSQL_RES *msql_res;
4.49 - GMythQuery *gmyth_query;
4.50 + MYSQL_RES *msql_res = NULL;
4.51 + GMythQuery *gmyth_query = NULL;
4.52 gboolean ret = TRUE;
4.53 -
4.54 - GString *stmt_str;
4.55 + GString *stmt_str = NULL;
4.56
4.57 g_static_mutex_lock( &mutex );
4.58