]> code.citadel.org Git - citadel.git/blobdiff - citadel/file_ops.c
* Run netproc -i after a successful NUOP
[citadel.git] / citadel / file_ops.c
index 955228e0b2e0cd05fe02adfce14728ca8c1d10d4..17bc5dcda25a3f284229db96ab5b48728e350b14 100644 (file)
@@ -528,7 +528,7 @@ void cmd_ucls(char *cmd)
        if (CC->upload_fp == NULL) {
                cprintf("%d You don't have an upload file open.\n",ERROR);
                return;
-               }
+       }
 
        fclose(CC->upload_fp);
        CC->upload_fp = NULL;
@@ -536,9 +536,17 @@ void cmd_ucls(char *cmd)
        if ((!strcasecmp(cmd,"1")) && (CC->upload_type != UPL_FILE)) {
                CC->upload_type = UPL_FILE;
                cprintf("%d Upload completed.\n", OK);
-               return;
+
+               if (CC->upload_type == UPL_NET) {
+                       if (fork()==0) {
+                               execlp("./netproc", "netproc", "-i", NULL);
+                               exit(errno);
+                       }
                }
 
+               return;
+       }
+
        if (!strcasecmp(cmd,"1")) {
                cprintf("%d File '%s' saved.\n",OK,CC->upl_path);
                fp = fopen(CC->upl_filedir,"a");
@@ -546,20 +554,22 @@ void cmd_ucls(char *cmd)
                if (fp!=NULL) {
                        fprintf(fp,"%s %s\n",CC->upl_file,CC->upl_comment);
                        fclose(fp);
-                       }
+               }
 
                /* put together an upload notice */
                sprintf(upload_notice,
                        "NEW UPLOAD: '%s'\n %s\n",
                        CC->upl_file,CC->upl_comment);
-               quickie_message(CC->curr_user, CC->quickroom.QRname,
+               quickie_message(CC->curr_user, NULL, CC->quickroom.QRname,
                                upload_notice);
-               }
+       }
        else {
                abort_upl(CC);
                cprintf("%d File '%s' aborted.\n",OK,CC->upl_path);
-               }
        }
+}
+
+
 
 /*
  * read from the download file