Skip to content
Snippets Groups Projects
Commit 25ed5ec7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Support multiple files ("FileList" per FTS-1) in subj when creating .REQ files

Previously, this feature assumed just one request per FREQ message, however
FTS-1 make this clear:

      If  one  or more  of FileAttached, FileRequest, or  FileUpdateReq  are
      asserted  in an AttributeWord, the subject{72} field is interpreted as
      a  list of file specifications  which may include wildcards and  other
      system-dependent data.  This list is of the form

      FileList = [ FileSpec { Sep FileSpec } ] Null

      FileSpec = (* implementation dependent file specification.  may
                    not contain Null or any of the characters in Sep. *)

      Sep      = ( " " | "," )  { " " }
parent bf3a2d83
No related branches found
No related tags found
No related merge requests found
......@@ -5506,7 +5506,11 @@ void pack_netmail(void)
if((fp=fopen(req,"a")) == NULL)
lprintf(LOG_ERR,"ERROR %d (%s) creating/opening %s", errno, strerror(errno), req);
else {
fprintf(fp,"%s\n",getfname(hdr.subj));
char filelist[FIDO_SUBJ_LEN];
SAFECOPY(filelist, hdr.subj);
char* token;
for(token = strtok(filelist, " ,"); token != NULL; token = strtok(NULL, " ,"))
fprintf(fp,"%s\n",getfname(token));
fclose(fp);
if(write_flofile(req, addr,/* bundle: */false, cfg.use_outboxes, /* del_file: */true, hdr.attr))
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment