]> matita.cs.unibo.it Git - helm.git/commitdiff
Added facility for resetting the library.
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Thu, 23 Jun 2011 14:09:15 +0000 (14:09 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Thu, 23 Jun 2011 14:09:15 +0000 (14:09 +0000)
matitaB/matita/matitadaemon.ml
matitaB/matita/netplex.conf

index c1bcab0d7bffbdbe394a9406a2f3c6b70ecb4fe7..d98a21e9b1e59a56536818617d66409f74cb7d96 100644 (file)
@@ -536,6 +536,13 @@ let start() =
       dyn_translator = (fun _ -> ""); (* not needed *)
       dyn_accept_all_conditionals = false;
     } in 
+  let do_resetlib =
+    { Nethttpd_services.dyn_handler = (fun _ -> resetLib);
+      dyn_activation = Nethttpd_services.std_activation `Std_activation_buffered;
+      dyn_uri = None;                 (* not needed *)
+      dyn_translator = (fun _ -> ""); (* not needed *)
+      dyn_accept_all_conditionals = false;
+    } in 
   
   let nethttpd_factory = 
     Nethttpd_plex.nethttpd_factory
@@ -546,6 +553,7 @@ let start() =
                 ; "register", do_register
                 ; "login", do_login 
                 ; "logout", do_logout 
+                ; "reset", do_resetlib
                 ; "viewlib", do_viewlib]
       () in
   MatitaInit.initialize_all ();
index a270765e9482ca218c3bad38afd9b23e622ef364..daa41247d56e7aacf1938c57cb823e4b5dde265d 100644 (file)
@@ -88,6 +88,13 @@ netplex {
             handler = "viewlib";
           }
         };
+        uri {
+          path = "/reset";
+          service {
+            type = "dynamic";
+            handler = "reset";
+          }
+        };
       };
     };
     workload_manager {