zoomsh: check for ext type parameter
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 30 Jul 2012 13:18:50 +0000 (15:18 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 30 Jul 2012 13:18:50 +0000 (15:18 +0200)
Must be given.

zoom/zoomsh.c

index 238c3d9..26aab7b 100644 (file)
@@ -401,6 +401,12 @@ static int cmd_ext(ZOOM_connection *c, ZOOM_resultset *r,
     int ret = 0;
     WRBUF ext_type_str = next_token_new_wrbuf(args);
     
     int ret = 0;
     WRBUF ext_type_str = next_token_new_wrbuf(args);
     
+    if (!ext_type_str)
+    {
+        printf("es: missing type "
+               "(itemorder, create, drop, commit, update, xmlupdate)\n");
+        return 1;
+    }
     for (i = 0; i<MAX_CON; i++)
     {
         if (c[i])
     for (i = 0; i<MAX_CON; i++)
     {
         if (c[i])