This commit is contained in:
Andrew Leary 2018-09-07 05:11:26 -04:00
parent 74e53ee234
commit 0aa9600d73
12 changed files with 103 additions and 31 deletions

View File

@ -1,3 +1,16 @@
v1.0.7.4 26-Aug-2017 - Andrew Leary
1. Updated to FTSCPROD.019 as released by the FTSC.
2. When creating a new ~/etc/domain.data, mbsetup no longer
includes entries for FidoNet zones 5 & 6.
3. Began preliminary work on FTN domain aliases, similar to
the BinkD "domain <new-name> alias-for <name>" option. This
will allow MBSE to fully communicate with systems that use
FTN domain names longer than 8 characters, which are NOT
FTSC compliant.
v1.0.7.3 01-Aug-2017 - Andrew Leary
1. Updated to FTSCPROD.018 as released by the FTSC.

2
configure vendored
View File

@ -2309,7 +2309,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="7.3"
REVISION="7.4"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2017 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2017 MBSE DevTm"

View File

@ -12,7 +12,7 @@ AC_SUBST(SUBDIRS)
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="7.3"
REVISION="7.4"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2017 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2017 MBSE DevTm"

Binary file not shown.

View File

@ -75,7 +75,7 @@ int SearchFidonet(unsigned short zone)
FILE *fil;
/*
* If current record is ok, return immediatly.
* If current record is ok, return immediately.
*/
if (TestFidonet(zone))
return TRUE;
@ -111,3 +111,40 @@ char *GetFidoDomain(unsigned short zone)
}
int InitDomainAlias(void)
{
FILE *fil;
memset(&domalias, 0, sizeof(domalias));
LoadConfig();
snprintf(domalias_fil, PATH_MAX -1, "%s/etc/domalias.data", getenv("MBSE_ROOT"));
if ((fil = fopen(domalias_fil, "r")) == NULL)
return FALSE;
fread(&domaliashdr, sizeof(domaliashdr), 1, fil);
fseek(fil, 0, SEEK_END);
domalias_cnt = (ftell(fil) - domaliashdr.hdrsize) / domaliashdr.recsize;
fclose(fil);
return TRUE;
}
char *SearchDomainAlias(char *alias)
{
FILE *fil;
if ((fil = fopen(domalias_fil, "r")) == NULL) {
return NULL;
}
fread(&domaliashdr, sizeof(domaliashdr), 1, fil);
while (fread(&domalias, domaliashdr.recsize, 1, fil) == 1) {
if (strcmp(alias, domalias.alias) == 0) {
fclose(fil);
return domalias.domain;
}
}
fclose(fil);
return NULL;
}

View File

@ -61,8 +61,19 @@ int TestFidonet(unsigned short); /* Test if zone is in memory */
int SearchFidonet(unsigned short); /* Search specified zone and load */
char *GetFidoDomain(unsigned short); /* Search Fidonet domain name */
/*
* Domain alias database
*/
struct _domaliashdr domaliashdr; /* Header record */
struct _domalias domalias; /* Domain alias datarecord */
int domalias_cnt; /* Domain alias records in db */
char domalias_fil[PATH_MAX]; /* Domain alias db filename */
void InitDomAlias(void); /* Initialize domain alias db */
char *SearchDomAlias(char *alias); /* Search alias db - returns string */
/* of domain or NUL if not found */
/*
* Nodes database
*/

View File

@ -1491,7 +1491,20 @@ struct _fidonet {
unsigned deleted : 1; /* Network is deleted */
};
/*
* Fidonet domain aliases (domalias.data)
*/
struct _domaliashdr {
int hdrsize; /* Size of header record */
int recsize; /* Size of records */
};
struct _domalias {
char alias[20]; /* Domain alias */
char domain[13]; /* Network domain name */
unsigned active : 1; /* Alias is active */
unsigned deleted : 1; /* Alias is deleted */
};
/*
* Archiver programs (archiver.data)

View File

@ -120,12 +120,11 @@ int main(int argc, char **argv)
cmd = xstrcat(cmd, argv[i]);
if (!strncasecmp(argv[i], "-a", 2)) {
do_annon = TRUE;
} else if (!strncasecmp(argv[i], "-v", 2)) {
do_novir = TRUE;
} else {
} else {
Description = xstrcpy(argv[i]);
}
}
break;
}
} else if ((!strncasecmp(argv[i], "d", 1)) || (!strncasecmp(argv[i], "u", 1))) {
if (!strncasecmp(argv[i], "u", 1))

View File

@ -9,19 +9,19 @@ SRCS = grlist.c m_domain.c m_fgroup.c m_lang.c m_marea.c m_new.c m_ibc.c \
m_limits.c m_menu.c m_ngroup.c m_service.c m_tty.c mutil.c m_archive.c \
m_fdb.c m_global.c m_magic.c m_mgroup.c m_node.c m_task.c m_users.c \
screen.c m_bbs.c m_ff.c m_hatch.c m_mail.c m_modem.c m_ol.c m_tic.c \
m_virus.c stlist.c m_route.c
m_virus.c stlist.c m_route.c m_domalias.c
HDRS = grlist.h m_domain.h m_fgroup.h m_lang.h m_marea.h m_new.h m_ibc.h m_protocol.h \
m_ticarea.h mutil.h ledit.h m_farea.h m_fido.h m_limits.h m_menu.h \
m_ngroup.h m_service.h m_tty.h screen.h m_archive.h m_fdb.h m_global.h \
m_magic.h m_mgroup.h m_node.h m_task.h m_users.h stlist.h m_bbs.h m_ff.h \
m_hatch.h m_mail.h m_modem.h m_ol.h m_tic.h m_virus.h \
m_route.h
m_route.h m_domalias.h
OBJS = grlist.o m_domain.o m_fgroup.o m_lang.o m_marea.o m_new.o m_ibc.o m_protocol.o \
m_ticarea.o mbsetup.o ledit.o m_farea.o m_fido.o m_limits.o m_menu.o \
m_ngroup.o m_service.o m_tty.o mutil.o m_archive.o m_fdb.o m_global.o \
m_magic.o m_mgroup.o m_node.o m_task.o m_users.o screen.o m_bbs.o m_ff.o \
m_hatch.o m_mail.o m_modem.o m_ol.o m_tic.o m_virus.o stlist.o \
m_route.o
m_route.o m_domalias.o
SLIBS = ../lib/libmbse.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libdiesel.a
OTHER = Makefile
@ -109,4 +109,5 @@ m_tic.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h m_fgroup.h m_tica
m_virus.o: ../config.h ../lib/mbselib.h ../paths.h screen.h mutil.h ledit.h stlist.h m_global.h m_virus.h
stlist.o: ../config.h ../lib/mbselib.h stlist.h
m_route.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_node.h m_route.h
m_domalias.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h m_global.h m_menu.h m_domalias.h
# End of generated dependencies

View File

@ -73,18 +73,12 @@ int CountDomain(void)
snprintf(domtrans.ftndom, 61, ".z4.fidonet");
snprintf(domtrans.intdom, 61, ".z4.fidonet.org");
fwrite(&domtrans, sizeof(domtrans), 1, fil);
snprintf(domtrans.ftndom, 61, ".z5.fidonet");
snprintf(domtrans.intdom, 61, ".z5.fidonet.org");
fwrite(&domtrans, sizeof(domtrans), 1, fil);
snprintf(domtrans.ftndom, 61, ".z6.fidonet");
snprintf(domtrans.intdom, 61, ".z6.fidonet.org");
fwrite(&domtrans, sizeof(domtrans), 1, fil);
snprintf(domtrans.ftndom, 61, ".fidonet");
snprintf(domtrans.intdom, 61, ".ftn");
fwrite(&domtrans, sizeof(domtrans), 1, fil);
fclose(fil);
chmod(ffile, 0640);
return 7;
return 5;
} else
return -1;
}

View File

@ -327,7 +327,7 @@ int EditFidoRec(int Area)
free(temp);
return 0;
case 1: E_STR(7,26,40, fidonet.comment, "The ^Comment^ for this network name")
case 2: E_STR(8, 26,8, fidonet.domain, "The ^Name^ of the network without dots")
case 2: E_STR(8,26,8, fidonet.domain, "The ^Name^ of the network without dots")
case 3: E_BOOL(9,26, fidonet.available, "Is this network ^Available^ for use")
case 4: E_BOOL(10,26, fidonet.deleted, "Is this netword ^Deleted^")
case 5: E_STR(11,26,8, fidonet.nodelist, "The name of the ^Primary Nodelist^ for this network")

View File

@ -66,7 +66,7 @@
#include "m_task.h"
#include "m_route.h"
#include "m_ibc.h"
#include "m_domalias.h"
mode_t oldmask; /* Old umask value */
extern int do_quiet; /* Suppress log to screen */
@ -464,19 +464,20 @@ int main(int argc, char *argv[])
mbse_mvprintw(15, 6, "9. Edit Mail Setup");
mbse_mvprintw(16, 6, "10. Edit File Echo's setup");
mbse_mvprintw(17, 6, "11. Edit Newfiles Groups");
mbse_mvprintw( 7,46, "12. Edit Newfiles Reports");
mbse_mvprintw( 8,46, "13. Edit FileFind Setup");
mbse_mvprintw( 9,46, "14. Edit Files Database");
mbse_mvprintw(10,46, "15. Edit BBS Users");
mbse_mvprintw(11,46, "16. Edit Services");
mbse_mvprintw(12,46, "17. Edit Domains");
mbse_mvprintw(13,46, "18. Edit Task Manager");
mbse_mvprintw(14,46, "19. Edit Routing Table");
mbse_mvprintw(15,46, "20. Edit Internet BBS Chat");
mbse_mvprintw(16,46, "21. Show software information");
mbse_mvprintw(17,46, "22. Create site documents");
mbse_mvprintw(18, 6, "12. Edit Newfiles Reports");
mbse_mvprintw( 7,46, "13. Edit FileFind Setup");
mbse_mvprintw( 8,46, "14. Edit Files Database");
mbse_mvprintw( 9,46, "15. Edit BBS Users");
mbse_mvprintw(10,46, "16. Edit Services");
mbse_mvprintw(11,46, "17. Edit Domains");
mbse_mvprintw(12,46, "18. Edit Task Manager");
mbse_mvprintw(13,46, "19. Edit Routing Table");
mbse_mvprintw(14,46, "20. Edit Internet BBS Chat");
mbse_mvprintw(15,46, "21. Show software information");
mbse_mvprintw(16,46, "22. Create site documents");
mbse_mvprintw(17,46, "23. Edit FTN Domain Aliases");
switch(select_menu(22)) {
switch(select_menu(23)) {
case 0:
loop = 0;
break;
@ -546,6 +547,9 @@ int main(int argc, char *argv[])
case 22:
site_docs();
break;
case 23:
EditDomAlias();
break;
}
} while (loop == 1);
}