Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 4bd8618c authored by deuce's avatar deuce

Add an option to allow socket-based transfer protocols on *nix. The new

setting currently has no effect on Win32.
parent 590f0528
......@@ -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);
......
......@@ -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 */
......
......@@ -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;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment