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

Fix MSLT and MSLD response for QWK packet filename in root directory

Reusing the variable 'str' here for multiple purposes meant the QWK packet
filename was overwritten by the owner name (the system's BBS-ID):

 ftp> mlsd
 229 Entering Extended Passive Mode (|||2001|)
 150 Opening ASCII mode data connection for MLSD.
 Type=file;Perm=r;UNIX.ownername=VERT; 00index
 Type=cdir;Perm=elc;UNIX.ownername=VERT; /
 Type=file;Perm=r;UNIX.ownername=VERT; VERT

That last file there should have been "VERT.qwk"
parent 4050fabe
No related branches found
No related tags found
No related merge requests found
......@@ -2110,6 +2110,7 @@ static void ctrl_thread(void* arg)
char buf[512];
char str[128];
char uniq[33];
char owner[33];
char* cmd;
char* p;
char* np;
......@@ -3640,8 +3641,8 @@ static void ctrl_thread(void* arg)
if (cmd[3] == 'D' || strcmp(str, mls_fname) == 0) {
if (cmd[3] == 'T')
sockprintf(sock,sess, "250- Listing %s", str);
get_owner_name(NULL, str);
send_mlsx_entry(fp, sock, sess, mlsx_feats, "file", "r", UINT64_MAX, 0, str, NULL, 0, cmd[3] == 'T' ? mls_path : str);
get_owner_name(NULL, owner);
send_mlsx_entry(fp, sock, sess, mlsx_feats, "file", "r", UINT64_MAX, 0, owner, NULL, 0, cmd[3] == 'T' ? mls_path : str);
l++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment