]> code.citadel.org Git - citadel.git/blobdiff - citadel/file_ops.c
Added the OPNA command for downloading attachments
[citadel.git] / citadel / file_ops.c
index 3043737d4e4c4b19bb23cb26f580798b665a90f7..e808766696e6f1eca7bcb63a37854b72cffd60e9 100644 (file)
@@ -220,7 +220,7 @@ void cmd_netf(char *cmdbuf)
        fclose(ofp);
 
        cprintf("%d File '%s' has been sent to %s.\n",OK,filename,destsys);
-       system("nohup ./netproc >/dev/null 2>&1 &");
+       system("nohup ./netproc -i >/dev/null 2>&1 &");
        return;
        }
 
@@ -229,11 +229,12 @@ void cmd_netf(char *cmdbuf)
  * It examines the file and displays the OK result code and some information
  * about the file.  NOTE: this stuff is Unix dependent.
  */
-void OpenCmdResult(void) {
+void OpenCmdResult(char *filename, char *mime_type) {
        struct stat statbuf;
 
        fstat(fileno(CC->download_fp), &statbuf);
-       cprintf("%d %ld|%ld\n", OK, statbuf.st_size, statbuf.st_mtime);
+       cprintf("%d %ld|%ld|%s|%s\n", OK, statbuf.st_size, statbuf.st_mtime,
+                                       filename, mime_type);
        }
 
 
@@ -282,7 +283,7 @@ void cmd_open(char *cmdbuf)
                return;
                }
 
-       OpenCmdResult();
+       OpenCmdResult(filename, "application/octet-stream");
        }
 
 /*
@@ -342,7 +343,7 @@ void cmd_oimg(char *cmdbuf)
                return;
                }
        
-       OpenCmdResult();
+       OpenCmdResult(pathname, "image/gif");
        }
 
 /*
@@ -558,7 +559,7 @@ void cmd_ucls(char *cmd)
                fprintf(fp,"NEW UPLOAD: '%s'\n %s\n",CC->upl_file,CC->upl_comment);
                putc(0,fp);
                fclose(fp);
-               save_message(CC->temp, "", 0, M_LOCAL, 1);
+               save_message(CC->temp, "", "", M_LOCAL, 1);
 
                }
        else {