Package: microdc2
Version: 0.15.6-1
Severity: wishlist
Tags: upstream patch

I had use of being able to refresh the file list on demand instead of waiting
for the automatic refresh interval. I added a (very) simple function to do this
by giving the command "rehash" in the main interface. It seems to have been
working the short time I've tested it.



-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=sv_SE, LC_CTYPE=sv_SE (charmap=ISO-8859-1) (ignored: LC_ALL set to 
sv_SE)
Shell: /bin/sh linked to /bin/dash

Versions of packages microdc2 depends on:
ii  libbz2-1.0                  1.0.5-6      high-quality block-sorting file co
ii  libc6                       2.11.2-11    Embedded GNU C Library: Shared lib
ii  libreadline6                6.1-3        GNU readline and history libraries
ii  libxml2                     2.7.8.dfsg-2 GNOME XML library

microdc2 recommends no packages.

microdc2 suggests no packages.

-- no debconf information
--- 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;

Reply via email to