diff --git a/src/sbbs3/download.cpp b/src/sbbs3/download.cpp index 7c71a7fe27bf37eca1acc02375cb1d0f8c8fc830..63effc0d95a6f931b4d05ef7f4c8c99e24416d21 100644 --- a/src/sbbs3/download.cpp +++ b/src/sbbs3/download.cpp @@ -231,7 +231,8 @@ int sbbs_t::protocol(prot_t* prot, enum XFER_TYPE type if(prot->misc&PROT_NATIVE) ex_mode|=EX_NATIVE; #ifdef __unix__ /* file xfer progs must use stdio on Unix */ - ex_mode|=(EX_INR|EX_OUTR|EX_BIN); + if(!(prot->misc&PROT_SOCKET)) + ex_mode|=(EX_INR|EX_OUTR|EX_BIN); #endif i=external(cmdline,ex_mode,p); diff --git a/src/sbbs3/sbbsdefs.h b/src/sbbs3/sbbsdefs.h index 53132527c33e441a37bcdb300372f2ec2d83cdba..c72813efb450512ef2ccc55504ed94d255881977 100644 --- a/src/sbbs3/sbbsdefs.h +++ b/src/sbbs3/sbbsdefs.h @@ -200,6 +200,7 @@ typedef struct { /* Bit values for prot[x].misc */ #define PROT_DSZLOG (1<<0) /* Supports DSZ Log */ #define PROT_NATIVE (1<<1) /* Native (32-bit) executable */ +#define PROT_SOCKET (1<<2) /* Use socket I/O, not stdio on *nix */ /* Bit values in netmail_misc */ diff --git a/src/sbbs3/scfg/scfgxfr1.c b/src/sbbs3/scfg/scfgxfr1.c index cee875cc0294964adba9739fb676c92037db4b27..26f0a98a6b43363a369d9edaa441ca1c6d52f001 100644 --- a/src/sbbs3/scfg/scfgxfr1.c +++ b/src/sbbs3/scfg/scfgxfr1.c @@ -813,10 +813,12 @@ This is a list of file transfer protocols that can be used to transfer files either to or from a remote user. For each protocol, you can specify the mnemonic (hot-key) to use to specify that protocol, the command line to use for uploads, downloads, batch uploads, batch -downloads, bi-directional file transfers, and the support of DSZLOG. If -the protocol doesn't support a certain method of transfer, or you don't -wish it to be available for a certain method of transfer, leave the -command line for that method blank. +downloads, bi-directional file transfers, support of DSZLOG, and (for +*nix only) if it uses socket I/O or the more common stdio. + +If the protocol doesn't support a certain method of transfer, or you +don't wish it to be available for a certain method of transfer, leave +the command line for that method blank. */ i=uifc.list(i,0,0,50,&prot_dflt,NULL,"File Transfer Protocols",opt); if(i==-1) @@ -892,6 +894,8 @@ command line for that method blank. ,cfg.prot[i]->misc&PROT_NATIVE ? "Yes" : "No"); sprintf(opt[j++],"%-30.30s%s", "Supports DSZLOG" ,cfg.prot[i]->misc&PROT_DSZLOG ? "Yes":"No"); + sprintf(opt[j++],"%-30.30s%s", "Socket I/O" + ,cfg.prot[i]->misc&PROT_SOCKET ? "Yes":"No"); opt[j][0]=0; switch(uifc.list(WIN_RHT|WIN_BOT|WIN_SAV|WIN_ACT,0,0,70,&prot_opt,0 ,"File Transfer Protocol",opt)) { @@ -967,6 +971,19 @@ command line for that method blank. uifc.changes=1; } break; + case 10: + l=cfg.prot[i]->misc&PROT_SOCKET ? 0:1l; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; + l=uifc.list(WIN_MID|WIN_SAV,0,0,0,&l,0 + ,"Uses Socket I/O",opt); + if((l==0 && !(cfg.prot[i]->misc&PROT_SOCKET)) + || (l==1 && cfg.prot[i]->misc&PROT_SOCKET)) { + cfg.prot[i]->misc^=PROT_SOCKET; + uifc.changes=1; + } + break; } } }