Skip to content
Snippets Groups Projects
Commit 12075267 authored by rswindell's avatar rswindell
Browse files

Set zm.escape_telnet_iac based on [Zmodem] EscapeTelnetIAC value from sexyz.ini

(defaults to true) - only used in telnet mode.
Support both +list and @list (DSZ/FDSZ/CEXYZ) list file argument syntax.
Support filenames beginning with + or @ by checking if the file exists before
using as a file list.
parent e3b78783
Branches
Tags
No related merge requests found
......@@ -1218,7 +1218,7 @@ void exiting(void)
}
static const char* usage=
"usage: sexyz <socket> [-opts] <cmd> [file | path | +list]\n"
"usage: sexyz <socket> [-opts] <cmd> [file | path | @list]\n"
"\n"
#ifdef __unix__
"socket = TCP socket descriptor (leave blank for stdio mode)\n"
......@@ -1329,6 +1329,7 @@ int main(int argc, char **argv)
zm.send_timeout =iniReadInteger(fp,"Zmodem","SendTimeout",zm.send_timeout); /* seconds */
zm.recv_timeout =iniReadInteger(fp,"Zmodem","RecvTimeout",zm.recv_timeout); /* seconds */
zm.max_errors =iniReadInteger(fp,"Zmodem","MaxErrors",zm.max_errors);
zm.escape_telnet_iac =iniReadBool(fp,"Zmodem","EscapeTelnetIAC",TRUE);
if(fp!=NULL)
fclose(fp);
......@@ -1445,7 +1446,7 @@ int main(int argc, char **argv)
}
}
else if(argv[i][0]=='+') {
else if((argv[i][0]=='+' || argv[i][0]=='@') && fexist(argv[i]+1)) {
if(mode&RECVDIR) {
fprintf(statfp,"!Cannot specify both directory and filename\n");
exit(1);
......@@ -1484,8 +1485,8 @@ int main(int argc, char **argv)
}
}
if(telnet)
zm.escape_telnet_iac = TRUE;
if(!telnet)
zm.escape_telnet_iac = FALSE;
if(sock==INVALID_SOCKET || sock<1) {
#ifdef __unix__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment