Added some stuff for T-Mail fileboxes

This commit is contained in:
Michiel Broek 2004-01-11 16:51:00 +00:00
parent b22b4b3904
commit 16b185f277
3 changed files with 64 additions and 5 deletions

View File

@ -972,7 +972,7 @@ TrType binkp_receiver(void)
} else if (bcmd == MM_EOB) { } else if (bcmd == MM_EOB) {
Syslog('+', "Binkp: rcvd M_EOB"); Syslog('+', "Binkp: rcvd M_EOB");
if ((bp.Major == 1) && (bp.Minor != 0)) { if ((bp.Major == 1) && (bp.Minor != 0)) {
Syslog('b', "Binkp: 1.1 check local_EOB=%s remote_EOB=%s messages=%d", Syslog('B', "Binkp: 1.1 check local_EOB=%s remote_EOB=%s messages=%d",
bp.local_EOB?"True":"False", bp.remote_EOB?"True":"False", bp.messages); bp.local_EOB?"True":"False", bp.remote_EOB?"True":"False", bp.messages);
if (bp.local_EOB && bp.remote_EOB) { if (bp.local_EOB && bp.remote_EOB) {
Syslog('b', "Binkp: receiver detects both sides in EOB state"); Syslog('b', "Binkp: receiver detects both sides in EOB state");
@ -1250,7 +1250,7 @@ TrType binkp_transmitter(void)
if ((respond = respond_wazoo()) != NULL) { if ((respond = respond_wazoo()) != NULL) {
for (tsl = tosend; tsl->next; tsl = tsl ->next); for (tsl = tosend; tsl->next; tsl = tsl ->next);
tsl->next = respond; tsl->next = respond;
Syslog('+', "Binkp: added requested files"); Syslog('b', "Binkp: added requested files");
} }
/* /*
@ -1415,7 +1415,7 @@ TrType binkp_transmitter(void)
} }
if ((bp.Major == 1) && (bp.Minor != 0)) { if ((bp.Major == 1) && (bp.Minor != 0)) {
Syslog('b', "Binkp: 1.1 check local_EOB=%s remote_EOB=%s messages=%d", Syslog('B', "Binkp: 1.1 check local_EOB=%s remote_EOB=%s messages=%d",
bp.local_EOB?"True":"False", bp.remote_EOB?"True":"False", bp.messages); bp.local_EOB?"True":"False", bp.remote_EOB?"True":"False", bp.messages);
if (bp.local_EOB && bp.remote_EOB) { if (bp.local_EOB && bp.remote_EOB) {
@ -1797,7 +1797,6 @@ int binkp_process_messages(void)
long lsize, loffs; long lsize, loffs;
Syslog('b', "Binkp: Process The Messages Queue Start"); Syslog('b', "Binkp: Process The Messages Queue Start");
debug_binkp_list(&bll);
lname = calloc(512, sizeof(char)); lname = calloc(512, sizeof(char));

View File

@ -67,6 +67,36 @@ static struct _alist
/*
* Returns name of T-Mail filebox in Dos format (8+3).
* I know, this code looks ungly, but it works. - MiCHA :-)
*/
const char* shortboxname(const faddr *fa) {
static char dirname[12];
unsigned z=fa->zone, n=fa->net, f=fa->node, p=fa->point;
unsigned u,v;
u=z%32; z/=32; if (z>=32) return NULL;
dirname[0]=z<10?z+'0':z-10+'a';
dirname[1]=u<10?u+'0':u-10+'a';
u=n%32; n/=32; v=n%32; n/=32; if (n>=32) return NULL;
dirname[2]=n<10?n+'0':n-10+'a';
dirname[3]=v<10?v+'0':v-10+'a';
dirname[4]=u<10?u+'0':u-10+'a';
u=f%32; f/=32; v=f%32; f/=32; if (f>=32) return NULL;
dirname[5]=f<10?f+'0':f-10+'a';
dirname[6]=v<10?v+'0':v-10+'a';
dirname[7]=u<10?u+'0':u-10+'a';
dirname[8]='.';
u=p%32; p/=32; if (p>=32) return NULL;
dirname[9]=p<10?p+'0':p-10+'a';
dirname[10]=u<10?u+'0':u-10+'a';
dirname[11]=0;
return dirname;
}
int outstat() int outstat()
{ {
int rc; int rc;

View File

@ -4,7 +4,7 @@
* Purpose ...............: mbtask - Scan mail outbound status * Purpose ...............: mbtask - Scan mail outbound status
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2003 * Copyright (C) 1997-2004
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -178,6 +178,36 @@ char *callmode(int mode)
/*
* Returns name of T-Mail filebox in Dos format (8+3).
* I know, this code looks ungly, but it works. - MiCHA :-)
*/
const char* shortboxname(const faddr *fa) {
static char dirname[12];
unsigned z=fa->zone, n=fa->net, f=fa->node, p=fa->point;
unsigned u,v;
u=z%32; z/=32; if (z>=32) return NULL;
dirname[0]=z<10?z+'0':z-10+'a';
dirname[1]=u<10?u+'0':u-10+'a';
u=n%32; n/=32; v=n%32; n/=32; if (n>=32) return NULL;
dirname[2]=n<10?n+'0':n-10+'a';
dirname[3]=v<10?v+'0':v-10+'a';
dirname[4]=u<10?u+'0':u-10+'a';
u=f%32; f/=32; v=f%32; f/=32; if (f>=32) return NULL;
dirname[5]=f<10?f+'0':f-10+'a';
dirname[6]=v<10?v+'0':v-10+'a';
dirname[7]=u<10?u+'0':u-10+'a';
dirname[8]='.';
u=p%32; p/=32; if (p>=32) return NULL;
dirname[9]=p<10?p+'0':p-10+'a';
dirname[10]=u<10?u+'0':u-10+'a';
dirname[11]=0;
return dirname;
}
/* /*
* Scan outbound, the call status is set in three counters: internet, * Scan outbound, the call status is set in three counters: internet,
* ISDN and POTS (analogue modems). * ISDN and POTS (analogue modems).