diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-03 21:30:15 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-03 21:30:15 +0200 |
commit | 480e5f2ea6699b1eefd113918dfee6d2d3d18d30 (patch) | |
tree | 9286dfe245f5c13667c749227b7ce706d8888dd7 | |
parent | 2f25352bd65ae7acb4612bcbc293a0f74239b67c (diff) |
commands.c: remotehost is now remotename for consistency with server->name.
-rw-r--r-- | commands.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); } |