1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Description: Add function to refresh share on demand
Author: Daniel Andersson <sskraep@gmail.com>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612372
Last-Update: 2011-08-26
--- a/src/command.c
+++ b/src/command.c
@@ -65,6 +65,7 @@
static void cmd_help(int argc, char **argv);
static void cmd_exit(int argc, char **argv);
static void cmd_say(int argc, char **argv);
+static void cmd_rehash(int argc, char **argv);
static void cmd_msg(int argc, char **argv);
static void cmd_raw(int argc, char **argv);
static void cmd_disconnect(int argc, char **argv);
@@ -268,6 +269,9 @@
"\n"
"Example:\n"
" say \"hi everyone!\"\n"));
+ add_builtin_command("rehash", cmd_rehash, NULL,
+ _("rehash"),
+ _("Refresh share.\n"));
add_builtin_command("search", cmd_search, NULL,
_("search WORD..."),
_("Issue a search for the specified search words.\n"));
@@ -874,6 +878,12 @@
}
static void
+cmd_rehash(int argc, char **argv)
+{
+ local_file_list_update_init();
+}
+
+static void
cmd_msg(int argc, char **argv)
{
char *t1;
|