Implemented No PLZ, No GZ/BZ2 options per node
This commit is contained in:
parent
f28946679c
commit
180632b4c6
10
ChangeLog
10
ChangeLog
@ -3,8 +3,13 @@ $Id$
|
||||
|
||||
v0.71.3 13-Jun-2005
|
||||
|
||||
upgrade:
|
||||
Check mbsetup 7.n.3.14 and 7.n.3.15 settings.
|
||||
|
||||
mbcico:
|
||||
Added support for binkp GZ and BZ2 compression.
|
||||
Added support for binkp GZ and BZ2 compression. Can be turned
|
||||
off per node. Only effective with originating calls. Incoming
|
||||
calls follow the remote.
|
||||
Increased binkp timeout from 180 to 300 seconds.
|
||||
|
||||
mbsebbs:
|
||||
@ -16,6 +21,9 @@ v0.71.3 13-Jun-2005
|
||||
mbfido:
|
||||
Fixed commandline parser for mail recipients.
|
||||
|
||||
mbsetup:
|
||||
Added setup switches per node to disable PLZ or GZ and BZ2
|
||||
compression protocols with binkp.
|
||||
|
||||
|
||||
v0.71.2 16-Jan-2005 - 13-Jun-2005
|
||||
|
@ -256,14 +256,23 @@ int binkp(int role)
|
||||
bp.msgs_on_queue = 0;
|
||||
bp.cmpblksize = SND_BLKSIZE;
|
||||
#ifdef HAVE_ZLIB_H
|
||||
bp.PLZflag = WeCan;
|
||||
if (localoptions & NOPLZ)
|
||||
bp.PLZflag = No;
|
||||
else
|
||||
bp.PLZflag = WeCan;
|
||||
bp.z_obuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
||||
bp.GZflag = WeCan;
|
||||
if (localoptions & NOGZBZ2)
|
||||
bp.GZflag = No;
|
||||
else
|
||||
bp.GZflag = WeCan;
|
||||
#else
|
||||
bp.PLZflag = No;
|
||||
#endif
|
||||
#ifdef HAVE_BZLIB_H
|
||||
bp.BZ2flag = WeCan;
|
||||
if (localoptions & NOGZBZ2)
|
||||
bp.BZ2flag = No;
|
||||
else
|
||||
bp.BZ2flag = WeCan;
|
||||
#endif
|
||||
bp.buggyIrex = FALSE;
|
||||
|
||||
@ -1945,14 +1954,22 @@ int binkp_banner(void)
|
||||
* Send extra options
|
||||
*/
|
||||
if (!rc) {
|
||||
p = xstrcpy((char *)"OPT EXTCMD");
|
||||
if (localoptions & NOGZBZ2)
|
||||
p = xstrcpy((char *)"OPT");
|
||||
else
|
||||
p = xstrcpy((char *)"OPT EXTCMD");
|
||||
#ifdef HAVE_BZLIB_H
|
||||
p = xstrcat(p, (char *)" BZ2");
|
||||
if (! (localoptions & NOGZBZ2))
|
||||
p = xstrcat(p, (char *)" BZ2");
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB_H
|
||||
p = xstrcat(p, (char *)" GZ PLZ");
|
||||
if (! (localoptions & NOPLZ))
|
||||
p = xstrcat(p, (char *)" PLZ");
|
||||
if (! (localoptions & NOGZBZ2))
|
||||
p = xstrcat(p, (char *)" GZ");
|
||||
#endif
|
||||
rc = binkp_send_command(MM_NUL,"%s", p);
|
||||
if (strcmp(p, "OPT"))
|
||||
rc = binkp_send_command(MM_NUL,"%s", p);
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Fidonet mailer
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2004
|
||||
* Copyright (C) 1997-2005
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -40,80 +40,95 @@ int localoptions;
|
||||
|
||||
|
||||
static struct _ktab {
|
||||
char *key;
|
||||
int flag;
|
||||
char *key;
|
||||
int flag;
|
||||
} ktab[] = {
|
||||
{(char *)"Call", NOCALL},
|
||||
{(char *)"WaZOO", NOWAZOO},
|
||||
{(char *)"EMSI", NOEMSI},
|
||||
{(char *)"Freqs", NOFREQS},
|
||||
{(char *)"Zmodem", NOZMODEM},
|
||||
{(char *)"ZedZap", NOZEDZAP},
|
||||
{(char *)"Hydra", NOHYDRA},
|
||||
{NULL, 0}
|
||||
{(char *)"Call", NOCALL},
|
||||
{(char *)"WaZOO", NOWAZOO},
|
||||
{(char *)"EMSI", NOEMSI},
|
||||
{(char *)"Freqs", NOFREQS},
|
||||
{(char *)"Zmodem", NOZMODEM},
|
||||
{(char *)"ZedZap", NOZEDZAP},
|
||||
{(char *)"Hydra", NOHYDRA},
|
||||
{(char *)"PLZ", NOPLZ},
|
||||
{(char *)"GZ/BZ2", NOGZBZ2},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
void logoptions(void)
|
||||
{
|
||||
int i;
|
||||
char *s = NULL;
|
||||
int i;
|
||||
char *s = NULL;
|
||||
|
||||
for (i=0;ktab[i].key;i++) {
|
||||
s=xstrcat(s,(char *)" ");
|
||||
if (localoptions & ktab[i].flag)
|
||||
s=xstrcat(s,(char *)"No");
|
||||
s=xstrcat(s,ktab[i].key);
|
||||
}
|
||||
for (i = 0; ktab[i].key; i++) {
|
||||
s = xstrcat(s, (char *)" ");
|
||||
if (localoptions & ktab[i].flag)
|
||||
s = xstrcat(s,(char *)"No");
|
||||
s = xstrcat(s, ktab[i].key);
|
||||
}
|
||||
|
||||
Syslog('+', "Options:%s",s);
|
||||
free(s);
|
||||
Syslog('+', "Options:%s",s);
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rdoptions(int Loaded)
|
||||
{
|
||||
localoptions=0;
|
||||
if (CFG.NoFreqs)
|
||||
localoptions |= NOFREQS;
|
||||
if (CFG.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (CFG.NoEMSI)
|
||||
localoptions |= NOEMSI;
|
||||
if (CFG.NoWazoo)
|
||||
localoptions |= NOWAZOO;
|
||||
if (CFG.NoZmodem)
|
||||
localoptions |= NOZMODEM;
|
||||
if (CFG.NoZedzap)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (CFG.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
localoptions = 0;
|
||||
if (CFG.NoFreqs)
|
||||
localoptions |= NOFREQS;
|
||||
if (CFG.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (CFG.NoEMSI)
|
||||
localoptions |= NOEMSI;
|
||||
if (CFG.NoWazoo)
|
||||
localoptions |= NOWAZOO;
|
||||
if (CFG.NoZmodem)
|
||||
localoptions |= NOZMODEM;
|
||||
if (CFG.NoZedzap)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (CFG.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
|
||||
if (nodes.Aka[0].zone == 0) {
|
||||
if (Loaded)
|
||||
Syslog('s', "Node not in setup, using default options");
|
||||
logoptions();
|
||||
return;
|
||||
}
|
||||
#ifndef HAVE_ZLIB_H
|
||||
localoptions |= NOPLZ;
|
||||
localoptions |= NOGZBZ2;
|
||||
#endif
|
||||
#ifndef HAVE_BZLIB_H
|
||||
localoptions |= NOGZBZ2;
|
||||
#endif
|
||||
|
||||
Syslog('s', "rdoptions node %s %s", nodes.Sysop, aka2str(nodes.Aka[0]));
|
||||
|
||||
if (nodes.NoEMSI)
|
||||
localoptions |= NOEMSI;
|
||||
if (nodes.NoWaZOO)
|
||||
localoptions |= NOWAZOO;
|
||||
if (nodes.NoFreqs)
|
||||
localoptions |= NOFREQS;
|
||||
if (nodes.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (nodes.NoZmodem)
|
||||
localoptions |= NOZMODEM;
|
||||
if (nodes.NoZedzap)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (nodes.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
if (nodes.Aka[0].zone == 0) {
|
||||
if (Loaded)
|
||||
Syslog('s', "Node not in setup, using default options");
|
||||
logoptions();
|
||||
return;
|
||||
}
|
||||
|
||||
Syslog('s', "rdoptions node %s %s", nodes.Sysop, aka2str(nodes.Aka[0]));
|
||||
|
||||
if (nodes.NoEMSI)
|
||||
localoptions |= NOEMSI;
|
||||
if (nodes.NoWaZOO)
|
||||
localoptions |= NOWAZOO;
|
||||
if (nodes.NoFreqs)
|
||||
localoptions |= NOFREQS;
|
||||
if (nodes.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (nodes.NoZmodem)
|
||||
localoptions |= NOZMODEM;
|
||||
if (nodes.NoZedzap)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (nodes.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
if (nodes.NoPLZ)
|
||||
localoptions |= NOPLZ;
|
||||
if (nodes.NoGZ)
|
||||
localoptions |= NOGZBZ2;
|
||||
|
||||
logoptions();
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@ extern int localoptions;
|
||||
#define NOZEDZAP 0x0080
|
||||
#define NOJANUS 0x0100
|
||||
#define NOHYDRA 0x0200
|
||||
#define NOPLZ 0x0400
|
||||
#define NOGZBZ2 0x0800
|
||||
|
||||
|
||||
struct _history history; /* History record for sessions */
|
||||
|
@ -803,11 +803,13 @@ void SessionScreen(void)
|
||||
mbse_mvprintw(18, 6, "12. Don't call");
|
||||
mbse_mvprintw(19, 6, "13. 8.3 names");
|
||||
|
||||
mbse_mvprintw(15,41, "14. No Zmodem");
|
||||
mbse_mvprintw(16,41, "15. No Zedzap");
|
||||
mbse_mvprintw(17,41, "16. No Hydra");
|
||||
mbse_mvprintw(18,41, "17. Binkp old esc");
|
||||
mbse_mvprintw(19,41, "18. No binkp/1.1");
|
||||
mbse_mvprintw(13,41, "14. No PLZ");
|
||||
mbse_mvprintw(14,41, "15. No GZ/BZ2");
|
||||
mbse_mvprintw(15,41, "16. No Zmodem");
|
||||
mbse_mvprintw(16,41, "17. No Zedzap");
|
||||
mbse_mvprintw(17,41, "18. No Hydra");
|
||||
mbse_mvprintw(18,41, "19. Binkp old esc");
|
||||
mbse_mvprintw(19,41, "20. No binkp/1.1");
|
||||
}
|
||||
|
||||
|
||||
@ -833,13 +835,15 @@ void SessionEdit(void)
|
||||
show_bool(18,26, nodes.NoCall);
|
||||
show_bool(19,26, nodes.FNC);
|
||||
|
||||
show_bool(13,61, nodes.NoPLZ);
|
||||
show_bool(14,61, nodes.NoGZ);
|
||||
show_bool(15,61, nodes.NoZmodem);
|
||||
show_bool(16,61, nodes.NoZedzap);
|
||||
show_bool(17,61, nodes.NoHydra);
|
||||
show_bool(18,61, nodes.WrongEscape);
|
||||
show_bool(19,61, nodes.NoBinkp11);
|
||||
|
||||
switch(select_menu(18)) {
|
||||
switch(select_menu(20)) {
|
||||
case 0: return;
|
||||
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
|
||||
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
||||
@ -857,11 +861,13 @@ void SessionEdit(void)
|
||||
case 12:E_BOOL(18,26, nodes.NoCall, "Don't ^call^ this node")
|
||||
case 13:E_BOOL(19,26, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
|
||||
|
||||
case 14:E_BOOL(15,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
||||
case 15:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
||||
case 16:E_BOOL(17,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
||||
case 17:E_BOOL(18,61, nodes.WrongEscape, "Use the ^old escape^ for long filenames (Argus, Irex)")
|
||||
case 18:E_BOOL(19,61, nodes.NoBinkp11, "Disable ^binkp/1.1^ (fallback to binkp/1.0) mode for this node")
|
||||
case 14:E_BOOL(13,61, nodes.NoPLZ, "Disable ^Binkp PLZ^ compression with this node")
|
||||
case 15:E_BOOL(14,61, nodes.NoGZ, "Disable ^Binkp GZ and BZ2^ compression with this node")
|
||||
case 16:E_BOOL(15,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
||||
case 17:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
||||
case 18:E_BOOL(17,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
||||
case 19:E_BOOL(18,61, nodes.WrongEscape, "Use the ^old escape^ for long filenames (Argus, Irex)")
|
||||
case 20:E_BOOL(19,61, nodes.NoBinkp11, "Disable ^binkp/1.1^ (fallback to binkp/1.0) mode for this node")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1539,7 +1545,11 @@ int node_doc(FILE *fp, FILE *toc, int page)
|
||||
fprintf(fp, " Don't call %s", getboolean(nodes.NoCall));
|
||||
add_webtable(wp, (char *)"Don't call", getboolean(nodes.NoCall));
|
||||
fprintf(fp, " 8.3 filenames %s", getboolean(nodes.FNC));
|
||||
add_webtable(wp, (char *)" 8.3 filenames", getboolean(nodes.FNC));
|
||||
add_webtable(wp, (char *)"8.3 filenames", getboolean(nodes.FNC));
|
||||
fprintf(fp, " No PLZ %s\n", getboolean(nodes.NoPLZ));
|
||||
add_webtable(wp, (char *)"No PLZ compression", getboolean(nodes.NoPLZ));
|
||||
fprintf(fp, " No GZ/BZ2 %s\n", getboolean(nodes.NoGZ));
|
||||
add_webtable(wp, (char *)"No GZ/BZ2 compression", getboolean(nodes.NoGZ));
|
||||
fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
|
||||
add_webtable(wp, (char *)"No Zmodem", getboolean(nodes.NoZmodem));
|
||||
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
|
||||
|
Reference in New Issue
Block a user