# HG changeset patch # User melunko # Date 1187790941 -3600 # Node ID a223e9d89b01f923f315d1af6a982c294aa0154e # Parent 1627de49faa28d5e829729d5b213ee9e4bf8cf3b [svn r826] gmyth-ls and gmyth_query now considers db_port. Thanks to Bastien Nocera for his patch. diff -r 1627de49faa2 -r a223e9d89b01 gmyth/samples/gmyth_ls.c --- a/gmyth/samples/gmyth_ls.c Wed Aug 22 14:07:49 2007 +0100 +++ b/gmyth/samples/gmyth_ls.c Wed Aug 22 14:55:41 2007 +0100 @@ -42,6 +42,7 @@ gchar *host_ip = NULL; gint host_port = 0; + gint db_port = 0; gboolean list_channels = FALSE; gchar *username = NULL; gchar *password = NULL; @@ -59,13 +60,17 @@ "LIST_CHANNELS"}, {"username", 'u', 0, G_OPTION_ARG_STRING, &username, - "Mysql database username. Default: mythtv" "Mysql user", + "Mysql database username. Default: mythtv", "MYSQL_USER"}, {"password", 'w', 0, G_OPTION_ARG_STRING, &password, - "Mysql database password. Default: mythtv" "Mysql password", + "Mysql database password. Default: mythtv", "MYSQL_PASSWD"}, + {"db_port", 'P', 0, G_OPTION_ARG_STRING, &db_port, + "Mysql database port. Default: 0", + "MYSQL_PORT"}, + {NULL} }; diff -r 1627de49faa2 -r a223e9d89b01 gmyth/src/gmyth_query.c --- a/gmyth/src/gmyth_query.c Wed Aug 22 14:07:49 2007 +0100 +++ b/gmyth/src/gmyth_query.c Wed Aug 22 14:55:41 2007 +0100 @@ -161,7 +161,9 @@ gmyth_query->backend_info->hostname, gmyth_query->backend_info->username, gmyth_query->backend_info->password, - gmyth_query->backend_info->db_name, 0, NULL, + gmyth_query->backend_info->db_name, + gmyth_query->backend_info->db_port, + NULL, 0) == NULL) { gmyth_query_print_error(gmyth_query->conn, "mysql_real_connect() failed");