summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/commands.c b/commands.c
index c01fb8c..d4f6709 100644
--- a/commands.c
+++ b/commands.c
@@ -30,19 +30,19 @@ static void list_local(GString *string, gchar *dirname, GError **error) {
}
}
-static void list_remote(GString *string, gchar *remotehost, gchar *dirname, GError **error) {
+static void list_remote(GString *string, gchar *remotename, gchar *dirname, GError **error) {
struct server *server = NULL;
for(GSList *node = servers; node; node = g_slist_next(node)) {
struct server *temp = node->data;
- if(g_strcasecmp(temp->host, remotehost) == 0) {
+ if(g_strcasecmp(temp->name, remotename) == 0) {
server = temp;
break;
}
}
if(server == NULL) {
- *error = g_error_new(commands_quark(), 0, "couldn't find remote host %s", remotehost);
+ *error = g_error_new(commands_quark(), 0, "couldn't find remote host %s", remotename);
return;
}
@@ -52,7 +52,7 @@ static void list_remote(GString *string, gchar *remotehost, gchar *dirname, GErr
return;
}
- g_debug("got %d results from %s", g_strv_length(data), remotehost);
+ g_debug("got %d results from %s", g_strv_length(data), remotename);
for(gint i = 0; i < g_strv_length(data); i++) {
if(strlen(data[i]) == 0) {
@@ -75,9 +75,9 @@ static void commands_list(GSocketConnection *connection, const gchar *cmd, GErro
return;
}
- gchar *dirname, *remotehost;
+ gchar *dirname, *remotename;
if(remote == TRUE) {
- remotehost = g_strdup(data[1]);
+ remotename = g_strdup(data[1]);
dirname = g_strdup(data[2]);
} else {
dirname = g_strdup(data[1]);
@@ -92,7 +92,7 @@ static void commands_list(GSocketConnection *connection, const gchar *cmd, GErro
GString *string = g_string_new(NULL);
if(remote == TRUE) {
- list_remote(string, remotehost, dirname, error);
+ list_remote(string, remotename, dirname, error);
} else {
list_local(string, dirname, error);
}