]> git.sur5r.net Git - ngadmin/blobdiff - cli/com_quit.c
Fix crash when reading the wrong type of VLAN
[ngadmin] / cli / com_quit.c
index 61dc5ce263e81b773e2d63abf6c780b7a39cee5c..f27620bb2008b5e0709b39822c54e9b255c76b24 100644 (file)
@@ -1,20 +1,17 @@
 
-#include "common.h"
-
-
-
-
-static bool do_quit (const struct TreeNode *tn UNUSED, int nb UNUSED, const char **com UNUSED, struct ngadmin *nga UNUSED) {
- cont=0;
- return true;
+#include "commands.h"
+
+
+int do_quit (int argc, const char **argv UNUSED, struct ngadmin *nga UNUSED)
+{
+       if (argc > 0) {
+               printf("this command takes no argument\n");
+               return 1;
+       }
+       
+       main_loop_continue = 0;
+       
+       return 0;
 }
 
 
-
-const struct TreeNode com_quit=COM("quit", do_quit, false, NULL);
-
-
-