Implemented No PLZ, No GZ/BZ2 options per node

This commit is contained in:
Michiel Broek 2005-07-03 20:32:21 +00:00
parent f28946679c
commit 180632b4c6
5 changed files with 130 additions and 78 deletions

View File

@ -3,8 +3,13 @@ $Id$
v0.71.3 13-Jun-2005 v0.71.3 13-Jun-2005
upgrade:
Check mbsetup 7.n.3.14 and 7.n.3.15 settings.
mbcico: 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. Increased binkp timeout from 180 to 300 seconds.
mbsebbs: mbsebbs:
@ -16,6 +21,9 @@ v0.71.3 13-Jun-2005
mbfido: mbfido:
Fixed commandline parser for mail recipients. 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 v0.71.2 16-Jan-2005 - 13-Jun-2005

View File

@ -256,13 +256,22 @@ int binkp(int role)
bp.msgs_on_queue = 0; bp.msgs_on_queue = 0;
bp.cmpblksize = SND_BLKSIZE; bp.cmpblksize = SND_BLKSIZE;
#ifdef HAVE_ZLIB_H #ifdef HAVE_ZLIB_H
if (localoptions & NOPLZ)
bp.PLZflag = No;
else
bp.PLZflag = WeCan; bp.PLZflag = WeCan;
bp.z_obuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char)); bp.z_obuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
if (localoptions & NOGZBZ2)
bp.GZflag = No;
else
bp.GZflag = WeCan; bp.GZflag = WeCan;
#else #else
bp.PLZflag = No; bp.PLZflag = No;
#endif #endif
#ifdef HAVE_BZLIB_H #ifdef HAVE_BZLIB_H
if (localoptions & NOGZBZ2)
bp.BZ2flag = No;
else
bp.BZ2flag = WeCan; bp.BZ2flag = WeCan;
#endif #endif
bp.buggyIrex = FALSE; bp.buggyIrex = FALSE;
@ -1945,13 +1954,21 @@ int binkp_banner(void)
* Send extra options * Send extra options
*/ */
if (!rc) { if (!rc) {
if (localoptions & NOGZBZ2)
p = xstrcpy((char *)"OPT");
else
p = xstrcpy((char *)"OPT EXTCMD"); p = xstrcpy((char *)"OPT EXTCMD");
#ifdef HAVE_BZLIB_H #ifdef HAVE_BZLIB_H
if (! (localoptions & NOGZBZ2))
p = xstrcat(p, (char *)" BZ2"); p = xstrcat(p, (char *)" BZ2");
#endif #endif
#ifdef HAVE_ZLIB_H #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 #endif
if (strcmp(p, "OPT"))
rc = binkp_send_command(MM_NUL,"%s", p); rc = binkp_send_command(MM_NUL,"%s", p);
free(p); free(p);
} }

View File

@ -4,7 +4,7 @@
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2004 * Copyright (C) 1997-2005
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -50,6 +50,8 @@ static struct _ktab {
{(char *)"Zmodem", NOZMODEM}, {(char *)"Zmodem", NOZMODEM},
{(char *)"ZedZap", NOZEDZAP}, {(char *)"ZedZap", NOZEDZAP},
{(char *)"Hydra", NOHYDRA}, {(char *)"Hydra", NOHYDRA},
{(char *)"PLZ", NOPLZ},
{(char *)"GZ/BZ2", NOGZBZ2},
{NULL, 0} {NULL, 0}
}; };
@ -91,6 +93,14 @@ void rdoptions(int Loaded)
if (CFG.NoHydra) if (CFG.NoHydra)
localoptions |= NOHYDRA; localoptions |= NOHYDRA;
#ifndef HAVE_ZLIB_H
localoptions |= NOPLZ;
localoptions |= NOGZBZ2;
#endif
#ifndef HAVE_BZLIB_H
localoptions |= NOGZBZ2;
#endif
if (nodes.Aka[0].zone == 0) { if (nodes.Aka[0].zone == 0) {
if (Loaded) if (Loaded)
Syslog('s', "Node not in setup, using default options"); Syslog('s', "Node not in setup, using default options");
@ -114,6 +124,11 @@ void rdoptions(int Loaded)
localoptions |= NOZEDZAP; localoptions |= NOZEDZAP;
if (nodes.NoHydra) if (nodes.NoHydra)
localoptions |= NOHYDRA; localoptions |= NOHYDRA;
if (nodes.NoPLZ)
localoptions |= NOPLZ;
if (nodes.NoGZ)
localoptions |= NOGZBZ2;
logoptions(); logoptions();
} }

View File

@ -60,6 +60,8 @@ extern int localoptions;
#define NOZEDZAP 0x0080 #define NOZEDZAP 0x0080
#define NOJANUS 0x0100 #define NOJANUS 0x0100
#define NOHYDRA 0x0200 #define NOHYDRA 0x0200
#define NOPLZ 0x0400
#define NOGZBZ2 0x0800
struct _history history; /* History record for sessions */ struct _history history; /* History record for sessions */

View File

@ -803,11 +803,13 @@ void SessionScreen(void)
mbse_mvprintw(18, 6, "12. Don't call"); mbse_mvprintw(18, 6, "12. Don't call");
mbse_mvprintw(19, 6, "13. 8.3 names"); mbse_mvprintw(19, 6, "13. 8.3 names");
mbse_mvprintw(15,41, "14. No Zmodem"); mbse_mvprintw(13,41, "14. No PLZ");
mbse_mvprintw(16,41, "15. No Zedzap"); mbse_mvprintw(14,41, "15. No GZ/BZ2");
mbse_mvprintw(17,41, "16. No Hydra"); mbse_mvprintw(15,41, "16. No Zmodem");
mbse_mvprintw(18,41, "17. Binkp old esc"); mbse_mvprintw(16,41, "17. No Zedzap");
mbse_mvprintw(19,41, "18. No binkp/1.1"); 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(18,26, nodes.NoCall);
show_bool(19,26, nodes.FNC); 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(15,61, nodes.NoZmodem);
show_bool(16,61, nodes.NoZedzap); show_bool(16,61, nodes.NoZedzap);
show_bool(17,61, nodes.NoHydra); show_bool(17,61, nodes.NoHydra);
show_bool(18,61, nodes.WrongEscape); show_bool(18,61, nodes.WrongEscape);
show_bool(19,61, nodes.NoBinkp11); show_bool(19,61, nodes.NoBinkp11);
switch(select_menu(18)) { switch(select_menu(20)) {
case 0: return; case 0: return;
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node") 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") 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 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 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 14:E_BOOL(13,61, nodes.NoPLZ, "Disable ^Binkp PLZ^ compression with this node")
case 15:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node") case 15:E_BOOL(14,61, nodes.NoGZ, "Disable ^Binkp GZ and BZ2^ compression with this node")
case 16:E_BOOL(17,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node") case 16:E_BOOL(15,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
case 17:E_BOOL(18,61, nodes.WrongEscape, "Use the ^old escape^ for long filenames (Argus, Irex)") case 17:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
case 18:E_BOOL(19,61, nodes.NoBinkp11, "Disable ^binkp/1.1^ (fallback to binkp/1.0) mode for 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")
} }
} }
} }
@ -1540,6 +1546,10 @@ int node_doc(FILE *fp, FILE *toc, int page)
add_webtable(wp, (char *)"Don't call", getboolean(nodes.NoCall)); add_webtable(wp, (char *)"Don't call", getboolean(nodes.NoCall));
fprintf(fp, " 8.3 filenames %s", getboolean(nodes.FNC)); 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)); fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
add_webtable(wp, (char *)"No Zmodem", getboolean(nodes.NoZmodem)); add_webtable(wp, (char *)"No Zmodem", getboolean(nodes.NoZmodem));
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap)); fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));