Compare commits

..

9 Commits
0.27 ... master

Author SHA1 Message Date
e0ac538e4f Ver .27.1 rm editorprj
All checks were successful
Altlinux build / build-alt (push) Successful in 1m6s
Archlinux build / build-arch (push) Successful in 6m5s
Archlinux build / make-test (push) Successful in 3m6s
Debian build / build-ubuntu (push) Successful in 3m50s
2026-03-22 19:38:04 +03:00
6fb4ace5cc Ver .27.1 fx .gitignore 2026-03-22 19:35:37 +03:00
6b73c068a0 Changed version to 0.27.1 2026-03-22 19:21:51 +03:00
eead012999 fix for GCC15
All checks were successful
Altlinux build / build-alt (push) Successful in 3m50s
Archlinux build / build-arch (push) Successful in 4m39s
Archlinux build / make-test (push) Successful in 2m8s
Debian build / build-ubuntu (push) Successful in 4m6s
2026-03-18 15:54:07 +03:00
981a9aba37 fixed for GCC 15 strict function prototyping on ArchLinux 2026-03-18 15:47:47 +03:00
901072385e Fix build
All checks were successful
Altlinux build / build-alt (push) Successful in 2m40s
Archlinux build / build-arch (push) Successful in 2m57s
Archlinux build / make-test (push) Successful in 1m0s
Debian build / build-ubuntu (push) Successful in 3m55s
2025-05-01 18:29:59 +03:00
926124dffc Fix uint32 types unknown
All checks were successful
Altlinux build / build-alt (push) Successful in 2m41s
Archlinux build / build-arch (push) Successful in 2m57s
Archlinux build / make-test (push) Successful in 1m0s
Debian build / build-ubuntu (push) Successful in 3m47s
2025-05-01 18:29:11 +03:00
5eb6ddc45b Endianness check
Some checks failed
Altlinux build / build-alt (push) Failing after 2m3s
Archlinux build / build-arch (push) Successful in 2m58s
Debian build / build-ubuntu (push) Has been cancelled
Archlinux build / make-test (push) Has been cancelled
2025-05-01 18:10:15 +03:00
144eacc0d6 Small FAQ change, nodelist investigation of aarch64 broken index
All checks were successful
Altlinux build / build-alt (push) Successful in 2m42s
Archlinux build / build-arch (push) Successful in 2m56s
Archlinux build / make-test (push) Successful in 1m0s
Debian build / build-ubuntu (push) Successful in 3m47s
2025-05-01 15:50:30 +03:00
12 changed files with 61 additions and 24 deletions

15
FAQ
View File

@ -108,9 +108,10 @@ A: /AK/
override <фидоадрес> [hidden] [Phone <тлф>] [Ipaddr <dns|ip>] [Flags <флаги>] override <фидоадрес> [hidden] [Phone <тлф>] [Ipaddr <dns|ip>] [Flags <флаги>]
ip-адрес/днс-имя сервера можно подменить как через Ipaddr, так и через ip-адрес/днс-имя сервера можно подменить как через Ipaddr, так и через
флаги, поставив INA:адрес флаги, поставив INA:адрес
Пример override: Пример override:
[ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,INA:coolbbs.spb.ru,INA:cool2.spb.ru,BEER:lager 1) [ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,INA:coolbbs.spb.ru,INA:cool2.spb.ru,BEER:lager]
override 2:5030/xxx Phone Unpublished Flags IFC,INA:reservbbs.dyndns.org \ override 2:5030/xxx hidden Flags IFC,INA:reservbbs.dyndns.org \
hidden Ipaddr 188.34.34.22 \ hidden Ipaddr 188.34.34.22 \
hidden Ipaddr 234.43.44.23 Flags IFC,CM hidden Ipaddr 234.43.44.23 Flags IFC,CM
@ -120,6 +121,16 @@ A: /AK/
3. 188.34.34.22:binkp 3. 188.34.34.22:binkp
4. 234.43.44.23:ifcico 4. 234.43.44.23:ifcico
5. cool2.spb.ru:binkp 5. cool2.spb.ru:binkp
2) [ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,IFC,INA:coolbbs3.spb.ru,BEER:porter]
override 2:5030/xxx Phone None Flags IFC,INA:rybak3.dyndns.org \
hidden Ipaddr 188.34.35.22
ðÏÒÑÄÏË ÄÏÚ×ÏÎÁ (ÄÏ ÐÅÒ×ÏÇÏ ÕÓÐÅÛÎÏÇÏ ÕÓÔÁÎÏ×ÌÅÎÉÑ ÓÅÓÓÉÉ):
1. rybak3.dyndns.org:ifcico
3. 188.34.35.22:ifcico
override ÂÅÚ ÏÐÃÉÉ hidden ÚÁÍÅÎÑÅÔ ÎÏÄÌÉÓÔÏ×ÙÅ ÐÏÌÑ!
Проверить настроенные override-s и порядок дозвона можно с помощью Проверить настроенные override-s и порядок дозвона можно с помощью
программы nlookup: опция -o показывает override, опция -t - порядок программы nlookup: опция -o показывает override, опция -t - порядок
дозвона (IP+PSTN) дозвона (IP+PSTN)

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
bforce (0.27.1) UNRELEASED; urgency=medium
* Fixed build under GCC15
-- Alexey Khromov <zx@zxalexis.ru> Sun, 22 Mar 2026 19:19:54 +0300
bforce (0.27) UNRELEASED; urgency=medium bforce (0.27) UNRELEASED; urgency=medium
* Fixed warnings from PVS-Studio analyser * Fixed warnings from PVS-Studio analyser

View File

@ -1,6 +1,6 @@
Summary: Bforce, Fidonet mailer Summary: Bforce, Fidonet mailer
Name: bforce Name: bforce
Version: 0.27 Version: 0.27.1
Release: %{_vendor}1 Release: %{_vendor}1
Copyright: GPL Copyright: GPL
Group: Fidonet/mailer Group: Fidonet/mailer

0
source/.ccls Normal file
View File

View File

@ -1 +1 @@
0.27 0.27.1

View File

@ -582,7 +582,7 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode)
return NULL; return NULL;
} }
} }
DEB((D_NODELIST, "nodelist_open: endianness = %x", (uint32_t) tmp.endian));
return xmemcpy(&tmp, sizeof(s_nodelist)); return xmemcpy(&tmp, sizeof(s_nodelist));
} }
@ -630,6 +630,7 @@ int nodelist_checkheader(s_nodelist *nlp)
(long)nlstat.st_size, (long)nlsize); (long)nlstat.st_size, (long)nlsize);
return -1; return -1;
} }
nlp->endian = buffer_getlong(buffer + 12);
return 0; return 0;
} }
@ -660,7 +661,7 @@ int nodelist_createheader(s_nodelist *nlp)
buffer_putlong(hdrbuf + 0, nlstat.st_mtime); buffer_putlong(hdrbuf + 0, nlstat.st_mtime);
buffer_putlong(hdrbuf + 4, nlstat.st_size); buffer_putlong(hdrbuf + 4, nlstat.st_size);
buffer_putlong(hdrbuf + 12, (long) 0xDEADBEEF);
if( fseek(nlp->fp_index, 0L, SEEK_SET) == -1 ) if( fseek(nlp->fp_index, 0L, SEEK_SET) == -1 )
{ {
logerr("cannot seek to zero offset of index"); logerr("cannot seek to zero offset of index");
@ -717,7 +718,9 @@ int nodelist_putindex(s_nodelist *nlp, const s_bni *bni)
buffer_putint(buffer + 6, bni->point); buffer_putint(buffer + 6, bni->point);
buffer_putint(buffer + 8, bni->hub); buffer_putint(buffer + 8, bni->hub);
buffer_putlong(buffer + 10, bni->offset); buffer_putlong(buffer + 10, bni->offset);
if (bni->point != 0) {
DEB((D_NODELIST, "nodelist: findindex found point z: %d, n: %d, l: %d, p: %d, offset: %l", bni->zone, bni->net, bni->node, bni->point, bni->offset));
}
if( fwrite(buffer, sizeof(buffer), 1, nlp->fp_index) != 1 ) if( fwrite(buffer, sizeof(buffer), 1, nlp->fp_index) != 1 )
{ {
logerr("error writing nodelist index file \"%s\"", nlp->name_index); logerr("error writing nodelist index file \"%s\"", nlp->name_index);
@ -752,6 +755,10 @@ int nodelist_findindex(s_nodelist *nlp, s_bni *bni, s_faddr addr)
bni->point = buffer_getint(p + 6); bni->point = buffer_getint(p + 6);
bni->hub = buffer_getint(p + 8); bni->hub = buffer_getint(p + 8);
bni->offset = buffer_getlong(p + 10); bni->offset = buffer_getlong(p + 10);
if ((uint32_t)nlp->endian == 0xBEEFDEAD) {
swap_long((char *)&bni->offset);
}
DEB((D_NODELIST, "nodelist: findindex found" ));
return 0; return 0;
} }
p += NODELIST_ENTRYSIZE; p += NODELIST_ENTRYSIZE;
@ -856,5 +863,6 @@ void nodelist_initnode(s_node *node, s_faddr addr)
strcpy(node->sysop, "<none>"); strcpy(node->sysop, "<none>");
strcpy(node->location, "<none>"); strcpy(node->location, "<none>");
strcpy(node->phone, "<none>"); strcpy(node->phone, "<none>");
strcpy(node->flags, "<none>");
} }

View File

@ -286,9 +286,9 @@ static int sm_tx_waitseq(s_tx_emsidat *d)
static s_states st_tx_emsidat[] = static s_states st_tx_emsidat[] =
{ {
{ "sm_tx_init", sm_tx_init }, { "sm_tx_init", (int (*)(void *))sm_tx_init },
{ "sm_tx_senddat", sm_tx_senddat }, { "sm_tx_senddat", (int (*)(void *))sm_tx_senddat },
{ "sm_tx_waitseq", sm_tx_waitseq } { "sm_tx_waitseq", (int (*)(void *))sm_tx_waitseq }
}; };
int emsi_send_emsidat(s_emsi *local_emsi) int emsi_send_emsidat(s_emsi *local_emsi)
@ -570,10 +570,10 @@ static int sm_rx_getdat(s_rx_emsidat *d)
static s_states st_rx_emsidat[] = static s_states st_rx_emsidat[] =
{ {
{ "sm_rx_init", sm_rx_init }, { "sm_rx_init", (int (*)(void *))sm_rx_init },
{ "sm_rx_sendnak", sm_rx_sendnak }, { "sm_rx_sendnak", (int (*)(void *))sm_rx_sendnak },
{ "sm_rx_waitseq", sm_rx_waitseq }, { "sm_rx_waitseq", (int (*)(void *))sm_rx_waitseq },
{ "sm_rx_getdat", sm_rx_getdat } { "sm_rx_getdat", (int (*)(void *))sm_rx_getdat }
}; };
int emsi_recv_emsidat(s_emsi *remote_emsi) int emsi_recv_emsidat(s_emsi *remote_emsi)

View File

@ -290,10 +290,10 @@ char *buffer_putint(char *buffer, int val)
*/ */
long buffer_getlong(const char *buffer) long buffer_getlong(const char *buffer)
{ {
return ( (unsigned long) ((unsigned char) buffer[0]) ) return (long)( (unsigned long) ((unsigned char) buffer[0]) )
| ( (unsigned long) ((unsigned char) buffer[1]) << 8 ) | ( (unsigned long) ((unsigned char) buffer[1]) << 8 )
| ( (unsigned long) ((unsigned char) buffer[2]) << 16 ) | ( (unsigned long) ((unsigned char) buffer[2]) << 16 )
| ( (unsigned long) ((unsigned char) buffer[3]) << 24 ); | ( (unsigned long) ((unsigned char) buffer[3]) << 24 );
} }
/***************************************************************************** /*****************************************************************************
@ -307,8 +307,17 @@ long buffer_getlong(const char *buffer)
*/ */
int buffer_getint(const char *buffer) int buffer_getint(const char *buffer)
{ {
return ( (unsigned int) ((unsigned char) buffer[0]) ) return (int)( (unsigned int) ((unsigned char) buffer[0]) )
| ( (unsigned int) ((unsigned char) buffer[1]) << 8 ); | ( (unsigned int) ((unsigned char) buffer[1]) << 8 );
}
void swap_long(char *buffer){
char *temp = xmemcpy(buffer, sizeof(uint32_t));
temp[0] = buffer[2];
temp[1] = buffer[3];
temp[2] = buffer[0];
temp[3] = buffer[1];
memcpy(buffer,temp,sizeof(uint32_t));
} }
void printf_usage(const char *ident, const char *fmt, ...) void printf_usage(const char *ident, const char *fmt, ...)

View File

@ -3,7 +3,7 @@ dnl
dnl $Id$ dnl $Id$
dnl dnl
#AC_INIT(bforce/bforce.c) #AC_INIT(bforce/bforce.c)
AC_INIT([bforce],[0.27],[zx@zxalexis.ru]) AC_INIT([bforce],[0.27.1],[zx@zxalexis.ru])
AC_CONFIG_HEADER(include/config.h) AC_CONFIG_HEADER(include/config.h)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
dnl # Minimum Autoconf version required. dnl # Minimum Autoconf version required.

View File

@ -27,7 +27,7 @@
* 0x0000 4 bytes Nodelist file date * 0x0000 4 bytes Nodelist file date
* 0x0004 4 bytes Nodelist file size * 0x0004 4 bytes Nodelist file size
* 0x0008 4 bytes Total number of entries in index file * 0x0008 4 bytes Total number of entries in index file
* 0x000c 4 bytes Unused * 0x000c 4 bytes ENDIANNES MARK
* *
* Nodelist index is an array of next entries: * Nodelist index is an array of next entries:
* *
@ -123,6 +123,7 @@ typedef struct nodelist
char name_index[BF_MAXPATH+1]; char name_index[BF_MAXPATH+1];
char name_nodelist[BF_MAXPATH+1]; char name_nodelist[BF_MAXPATH+1];
long entries; long entries;
long endian;
} }
s_nodelist; s_nodelist;

View File

@ -72,7 +72,7 @@
struct states struct states
{ {
const char *st_name; const char *st_name;
int (*proc)(); int (*proc)(void *);
}; };
typedef struct states s_states; typedef struct states s_states;

View File

@ -189,8 +189,10 @@ char *buffer_putlong(char *buffer, long val);
char *buffer_putint(char *buf, int val); char *buffer_putint(char *buf, int val);
long buffer_getlong(const char *buf); long buffer_getlong(const char *buf);
int buffer_getint(const char *buf); int buffer_getint(const char *buf);
void swap_long(char *buffer);
void printf_usage(const char *ident, const char *fmt, ...); void printf_usage(const char *ident, const char *fmt, ...);
/* u_pkt.c */ /* u_pkt.c */
int pkt_createpacket(const char *pktname, const s_packet *pkt); int pkt_createpacket(const char *pktname, const s_packet *pkt);