]> code.citadel.org Git - citadel.git/blobdiff - citadel/utils/sendcommand.c
Sendcommand: add missing break - so we don't fail to -w.
[citadel.git] / citadel / utils / sendcommand.c
index fde3d5c3c5dff8e39aee0fe6ca9f086e5c32b8a5..e97965f19b329dda6c0107549467381db21f4096 100644 (file)
@@ -153,10 +153,17 @@ int main(int argc, char **argv)
        while ((a = getopt(argc, argv, "h:w:")) != EOF) {
                switch (a) {
                case 'h':
-                       strcpy(relhome, optarg);
+                       relh=optarg[0]!='/';
+                       if (!relh) {
+                               strncpy(ctdl_home_directory, optarg, sizeof ctdl_home_directory);
+                       } else {
+                               strncpy(relhome, optarg, sizeof relhome);
+                       }
+                       home = 1;
                        break;
                case 'w':
                        watchdog = atoi(optarg);
+                       break;
                default:
                        fprintf(stderr, "sendcommand: usage: sendcommand [-h server_dir] [-w watchdog_timeout]\n");
                        return(1);