Several bugfixes

This commit is contained in:
Michiel Broek 2002-07-08 19:40:22 +00:00
parent bed48c9d4e
commit e04792e4cb
8 changed files with 801 additions and 776 deletions

View File

@ -4,12 +4,28 @@ $Id$
v0.35.03 06-Jul-2002 v0.35.03 06-Jul-2002
lang:
Corrected a spelling error in the Dutch language file.
mbcico: mbcico:
Changed IsDoing information. Changed IsDoing information.
newuser:
Check for Unix accounts is now case sensitive.
Check existing usernames now also checks handles.
mbsebbs:
Check existing usernames now also checks handles.
When a user paged the sysop for a chat, after the timer was
expired, the bbs crashed.
mbtask: mbtask:
Changed logging of multiple logmessages that are equal. Changed logging of multiple logmessages that are equal.
Changed semafore debug logmessages. Changed semafore debug logmessages.
Fixed log problem not always showing the Call flag.
Now forces callmode to None if the callflag was cleared.
The test to add a node to the calllist now also checks the
internal call flag.
v0.35.02 22-Jun-2002 - 06-Jul-2002 v0.35.02 22-Jun-2002 - 06-Jul-2002

View File

@ -380,7 +380,7 @@ JN|Zeker weten? [J/n]:
|Kies taal: |Kies taal:
|De taal is nu: |De taal is nu:
|Het systeem zal nu een "Unix gebruikersnaam" vragen |Het systeem zal nu een "Unix gebruikersnaam" vragen
|Uw "Unix gerbuikersnaam" is gemaakt, U kunt dit de volgende keer gebruiken. |Uw "Unix gebruikersnaam" is gemaakt, U kunt dit de volgende keer gebruiken.
|Geef een inlog naam (Maximaal 8 karakters, kleine letters) |Geef een inlog naam (Maximaal 8 karakters, kleine letters)
|bv. Piet Snot, login = psnot |bv. Piet Snot, login = psnot
|login > |login >

View File

@ -101,7 +101,7 @@ char *adate(time_t now)
struct tm ptm; struct tm ptm;
if (now == 0L) { if (now == 0L) {
sprintf(buf, "N/A"); sprintf(buf, " ");
} else { } else {
ptm = *localtime(&now); ptm = *localtime(&now);
sprintf(buf, "%02d-%02d-%04d %02d:%02d", ptm.tm_mday, ptm.tm_mon +1, ptm.tm_year + 1900, sprintf(buf, "%02d-%02d-%04d %02d:%02d", ptm.tm_mday, ptm.tm_mon +1, ptm.tm_year + 1900,
@ -148,7 +148,7 @@ void MakeStat(void)
fseek(fi, fileptr, SEEK_SET); fseek(fi, fileptr, SEEK_SET);
MacroVars("b", "s", mgroup.Name); MacroVars("b", "s", mgroup.Name);
MacroVars("c", "s", mgroup.Comment); MacroVars("c", "s", mgroup.Comment);
MacroVars("d", "s", aka2str(mgroup.UseAka)); MacroVars("d", "s", mgroup.UseAka.zone ? aka2str(mgroup.UseAka):" ");
MacroVars("e", "s", adate(mgroup.LastDate)); MacroVars("e", "s", adate(mgroup.LastDate));
MacroVars("f", "d", mgroup.MsgsRcvd.lweek); MacroVars("f", "d", mgroup.MsgsRcvd.lweek);
MacroVars("g", "d", mgroup.MsgsRcvd.month[Lm]); MacroVars("g", "d", mgroup.MsgsRcvd.month[Lm]);
@ -227,7 +227,7 @@ void MakeStat(void)
fseek(fi, fileptr, SEEK_SET); fseek(fi, fileptr, SEEK_SET);
MacroVars("b", "s", fgroup.Name); MacroVars("b", "s", fgroup.Name);
MacroVars("c", "s", fgroup.Comment); MacroVars("c", "s", fgroup.Comment);
MacroVars("d", "s", aka2str(fgroup.UseAka)); MacroVars("d", "s", fgroup.UseAka.zone ? aka2str(fgroup.UseAka):" ");
MacroVars("e", "s", adate(fgroup.LastDate)); MacroVars("e", "s", adate(fgroup.LastDate));
MacroVars("f", "d", fgroup.Files.lweek); MacroVars("f", "d", fgroup.Files.lweek);
MacroVars("g", "d", fgroup.KBytes.lweek); MacroVars("g", "d", fgroup.KBytes.lweek);
@ -343,7 +343,7 @@ void MakeStat(void)
fseek(fi, fileptr, SEEK_SET); fseek(fi, fileptr, SEEK_SET);
if (!strcmp(hist.aka.domain, "(null)")) if (!strcmp(hist.aka.domain, "(null)"))
hist.aka.domain[0] = '\0'; hist.aka.domain[0] = '\0';
MacroVars("c", "s", hist.aka.zone ? aka2str(hist.aka):"N/A"); MacroVars("c", "s", hist.aka.zone ? aka2str(hist.aka):" ");
MacroVars("d", "s", hist.system_name); MacroVars("d", "s", hist.system_name);
MacroVars("e", "s", hist.sysop); MacroVars("e", "s", hist.sysop);
MacroVars("f", "s", hist.location); MacroVars("f", "s", hist.location);

View File

@ -78,29 +78,24 @@ int CheckStatus()
/* /*
* Function to check if UserName exists and returns a 0 or 1 * Function to check if UserName/Handle exists and returns a 0 or 1
*/ */
int CheckName(char *Name) int CheckName(char *Name)
{ {
FILE *fp; FILE *fp;
int Status = FALSE; int Status = FALSE;
char *temp, *temp1; char *temp;
struct userhdr ushdr; struct userhdr ushdr;
struct userrec us; struct userrec us;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
temp1 = calloc(81, sizeof(char));
strcpy(temp1, tl(Name));
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
if ((fp = fopen(temp,"rb")) != NULL) { if ((fp = fopen(temp,"rb")) != NULL) {
fread(&ushdr, sizeof(ushdr), 1, fp); fread(&ushdr, sizeof(ushdr), 1, fp);
while (fread(&us, ushdr.recsize, 1, fp) == 1) { while (fread(&us, ushdr.recsize, 1, fp) == 1) {
strcpy(temp, tl(us.sUserName)); if ((strcasecmp(Name, us.sUserName) == 0) || (strcasecmp(Name, us.sHandle) == 0)) {
if((strcmp(temp, temp1)) == 0) {
Status = TRUE; Status = TRUE;
break; break;
} }
@ -109,7 +104,6 @@ int CheckName(char *Name)
} }
free(temp); free(temp);
free(temp1);
return Status; return Status;
} }

View File

@ -74,14 +74,11 @@ int do_mailout = FALSE; /* Just for linking */
int newuser() int newuser()
{ {
FILE *pUsrConfig; FILE *pUsrConfig;
int i, x, Found, iLang, recno = 0, Count = 0; int i, x, Found, iLang, recno = 0, Count = 0, badname;
unsigned long crc; unsigned long crc;
char temp[PATH_MAX], *FullName; char temp[PATH_MAX], *FullName, *temp1, *temp2, *Phone1, *Phone2;
char *temp1, *temp2;
char *Phone1, *Phone2;
long offset; long offset;
struct userrec us; struct userrec us;
int badname;
IsDoing("New user login"); IsDoing("New user login");
Syslog('+', "Newuser registration"); Syslog('+', "Newuser registration");
@ -141,6 +138,7 @@ int newuser()
*/ */
badname = (BadNames(temp) || (CheckName(temp) || (strchr(temp, ' ') == NULL))); badname = (BadNames(temp) || (CheckName(temp) || (strchr(temp, ' ') == NULL)));
if (badname) { if (badname) {
/* That login name already exists, please choose another one. */
language(LIGHTRED, BLACK, 386); language(LIGHTRED, BLACK, 386);
Enter(1); Enter(1);
} }
@ -283,7 +281,7 @@ int newuser()
language(YELLOW, BLACK, 49); language(YELLOW, BLACK, 49);
colour(CFG.InputColourF, CFG.InputColourB); colour(CFG.InputColourF, CFG.InputColourB);
alarm_on(); alarm_on();
if (CFG.iCapLocation) { /* Cap Location is turn on, Capitalise first letter */ if (CFG.iCapLocation) { /* Cap Location is turned on, Capitalise first letter */
fflush(stdout); fflush(stdout);
GetnameNE(temp, 24); GetnameNE(temp, 24);
} else } else
@ -328,6 +326,7 @@ int newuser()
} }
if (CFG.iHandle) { if (CFG.iHandle) {
do {
Enter(1); Enter(1);
/* Enter a handle (Enter to Quit): */ /* Enter a handle (Enter to Quit): */
language(LIGHTRED, BLACK, 412); language(LIGHTRED, BLACK, 412);
@ -336,11 +335,19 @@ int newuser()
alarm_on(); alarm_on();
Getname(temp, 34); Getname(temp, 34);
badname = (BadNames(temp) || CheckName(temp));
if (badname) {
/* That login name already exists, please choose another one. */
language(LIGHTRED, BLACK, 386);
Enter(1);
} else {
if(strcmp(temp, "") == 0) if(strcmp(temp, "") == 0)
strcpy(usrconfig.sHandle, ""); strcpy(usrconfig.sHandle, "");
else else
strcpy(usrconfig.sHandle, temp); strcpy(usrconfig.sHandle, temp);
} }
} while (badname);
}
/* /*
* Note, the users database always contains the english sex * Note, the users database always contains the english sex
@ -361,8 +368,7 @@ int newuser()
pout(CFG.InputColourF, CFG.InputColourB, (char *) Language(52)); pout(CFG.InputColourF, CFG.InputColourB, (char *) Language(52));
Enter(1); Enter(1);
break; break;
} else } else if (i == Keystroke(51, 1)) {
if (i == Keystroke(51, 1)) {
/* Female */ /* Female */
sprintf(usrconfig.sSex, "Female"); sprintf(usrconfig.sSex, "Female");
pout(CFG.InputColourF, CFG.InputColourB, (char *) Language(53)); pout(CFG.InputColourF, CFG.InputColourB, (char *) Language(53));
@ -521,15 +527,11 @@ int newuser()
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
if(CFG.iVoicePhone) { if (CFG.iVoicePhone && TelephoneScan(Phone1, FullName))
if(TelephoneScan(Phone1, FullName))
Syslog('!', "Duplicate phone numbers found"); Syslog('!', "Duplicate phone numbers found");
}
if(CFG.iDataPhone) { if (CFG.iDataPhone && TelephoneScan(Phone2, FullName))
if(TelephoneScan(Phone2, FullName))
Syslog('!', "Duplicate phone numbers found"); Syslog('!', "Duplicate phone numbers found");
}
free(temp1); free(temp1);
free(temp2); free(temp2);
@ -569,7 +571,7 @@ void Fast_Bye(int onsig)
unlink(temp); unlink(temp);
free(temp); free(temp);
colour(7, 0); colour(LIGHTGRAY, BLACK);
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
sleep(3); sleep(3);
@ -605,74 +607,78 @@ char *NameGen(char *FidoName)
struct passwd *pw; struct passwd *pw;
sUserName = calloc(10, sizeof(char)); sUserName = calloc(10, sizeof(char));
Syslog('+', "NameGen(%s)", FidoName); Syslog('+', "NameGen(%s)", FidoName);
setpwent();
while ((strcmp(sUserName, "") == 0 || (pw = getpwnam(sUserName)) != NULL) || (strlen(sUserName) < 3)) { while ((strcmp(sUserName, "") == 0) || ((pw = getpwnam(sUserName)) != NULL) || (strlen(sUserName) < 3)) {
colour(12, 0); colour(LIGHTRED, BLACK);
printf("\n%s\n\n", (char *) Language(381)); printf("\n%s\n\n", (char *) Language(381));
colour(15, 0); colour(WHITE, BLACK);
/* Please enter a login name (Maximum 8 characters) */ /* Please enter a login name (Maximum 8 characters) */
printf("\n%s\n", (char *) Language(383)); printf("\n%s\n", (char *) Language(383));
/* ie. John Doe, login = jdoe */ /* ie. John Doe, login = jdoe */
printf("%s\n", (char *) Language(384)); printf("%s\n", (char *) Language(384));
colour(10, 0); colour(LIGHTGREEN, BLACK);
/* login > */ /* login > */
printf("%s", (char *) Language(385)); printf("%s", (char *) Language(385));
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
GetstrU(sUserName, 7); GetstrU(sUserName, 7);
setpwent(); if ((pw = getpwnam(sUserName)) != NULL) {
if (pw = getpwnam(tl(sUserName)), pw != NULL) {
/* That login name already exists, please choose another one. */ /* That login name already exists, please choose another one. */
colour(12, 0); colour(LIGHTRED, BLACK);
printf("\n%s\n", (char *) Language(386)); printf("\n%s\n", (char *) Language(386));
setpwent();
} }
} }
return tl(sUserName); return sUserName;
} }
/* /*
* Function will create the users name in the passwd file * Function will create the users name in the passwd file
*/ */
char *NameCreate(char *Name, char *Comment, char *Password) char *NameCreate(char *Name, char *Comment, char *Password)
{ {
char *PassEnt; char *progname;
int err;
PassEnt = calloc(256, sizeof(char)); progname = calloc(PATH_MAX, sizeof(char));
/* /*
* Call mbuseradd, this is a special setuid root program to create * Call mbuseradd, this is a special setuid root program to create
* unix acounts and home directories. * unix acounts and home directories.
*/ */
sprintf(PassEnt, "%s/bin/mbuseradd %d %s \"%s\" %s", sprintf(progname, "%s/bin/mbuseradd %d %s \"%s\" %s", getenv("MBSE_ROOT"), getgid(), Name, Comment, CFG.bbs_usersdir);
getenv("MBSE_ROOT"), getgid(), Name, Comment, CFG.bbs_usersdir); Syslog('+', "%s", progname);
Syslog('+', "%s", PassEnt);
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
if (system(PassEnt) != 0) { if ((err = system(progname))) {
perror("");
WriteError("Failed to create unix account"); WriteError("Failed to create unix account");
free(PassEnt); free(progname);
ExitClient(1);
}
sprintf(PassEnt, "%s/bin/mbpasswd -f %s %s", getenv("MBSE_ROOT"), Name, Password);
Syslog('+', "%s/bin/mbpasswd -f %s ******", getenv("MBSE_ROOT"), Name);
if (system(PassEnt) != 0) {
WriteError("Failed to set unix password");
free(PassEnt);
ExitClient(1); ExitClient(1);
} }
colour(14, 0); sprintf(progname, "%s/bin/mbpasswd -f %s %s", getenv("MBSE_ROOT"), Name, Password);
Syslog('+', "%s/bin/mbpasswd -f %s ******", getenv("MBSE_ROOT"), Name);
fflush(stdout);
fflush(stdin);
if ((err = system(progname))) {
perror("");
WriteError("Failed to set unix password");
free(progname);
ExitClient(1);
}
colour(YELLOW, BLACK);
/* Your "Unix Account" is created, you may use it the next time you call */ /* Your "Unix Account" is created, you may use it the next time you call */
printf("\n%s\n", (char *) Language(382)); printf("\n%s\n", (char *) Language(382));
Syslog('+', "Created Unix account %s for %s", Name, Comment); Syslog('+', "Created Unix account %s for %s", Name, Comment);
free(PassEnt); free(progname);
return Name; return Name;
} }
@ -684,7 +690,7 @@ char *NameCreate(char *Name, char *Comment, char *Password)
int BadNames(char *Username) int BadNames(char *Username)
{ {
FILE *fp; FILE *fp;
short iFoundName = FALSE; int iFoundName = FALSE;
char *temp, *String, *User; char *temp, *String, *User;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
@ -728,7 +734,7 @@ int TelephoneScan(char *Number, char *Name)
struct userhdr uhdr; struct userhdr uhdr;
struct userrec u; struct userrec u;
temp = calloc(81, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
if ((fp = fopen(temp,"rb")) != NULL) { if ((fp = fopen(temp,"rb")) != NULL) {
@ -739,8 +745,7 @@ int TelephoneScan(char *Number, char *Name)
if ((strlen(u.sVoicePhone) && (strcmp(u.sVoicePhone, Number) == 0)) || if ((strlen(u.sVoicePhone) && (strcmp(u.sVoicePhone, Number) == 0)) ||
(strlen(u.sDataPhone) && (strcmp(u.sDataPhone, Number) == 0))) { (strlen(u.sDataPhone) && (strcmp(u.sDataPhone, Number) == 0))) {
Status = TRUE; Status = TRUE;
Syslog('b', "Dupe phones ref: \"%s\" voice: \"%s\" data: \"%s\"", Syslog('b', "Dupe phones ref: \"%s\" voice: \"%s\" data: \"%s\"", Number, u.sVoicePhone, u.sDataPhone);
Number, u.sVoicePhone, u.sDataPhone);
Syslog('+', "Uses the same telephone number as %s", u.sUserName); Syslog('+', "Uses the same telephone number as %s", u.sUserName);
} }
} }

View File

@ -52,11 +52,9 @@
*/ */
void Page_Sysop(char *String) void Page_Sysop(char *String)
{ {
int i; FILE *pWritingDevice;
FILE *pWritingDevice, *pBusy; int i, iOpenDevice = FALSE; /* Flag to check if you can write to CFG.sChatDevice */
int iOpenDevice = FALSE; /* Flag to check if you can write to CFG.sChatDevice */ char *Reason, temp[81];
char *Reason;
char temp[81];
Reason = calloc(81, sizeof(char)); Reason = calloc(81, sizeof(char));
@ -67,18 +65,18 @@ void Page_Sysop(char *String)
if (CFG.iAskReason) { if (CFG.iAskReason) {
locate(6, 0); locate(6, 0);
colour(1, 0); colour(BLUE, BLACK);
printf("%c", 213); printf("%c", 213);
for (i = 0; i < 78; i++) for (i = 0; i < 78; i++)
printf("%c", 205); printf("%c", 205);
printf("%c ", 184); printf("%c\n", 184);
colour(7, 0); colour(LIGHTGRAY, BLACK);
for (i = 0; i < 78; i++) for (i = 0; i < 78; i++)
printf("%c", 250); printf("%c", 250);
printf("\n"); printf("\n");
colour(1, 0); colour(BLUE, BLACK);
printf("%c", 212); printf("%c", 212);
for (i = 0; i < 78; i++) for (i = 0; i < 78; i++)
printf("%c", 205); printf("%c", 205);
@ -86,11 +84,11 @@ void Page_Sysop(char *String)
locate(7, 2); locate(7, 2);
colour(7, 0); colour(LIGHTGRAY, BLACK);
fflush(stdout); fflush(stdout);
GetPageStr(temp, 76); GetPageStr(temp, 76);
colour(1, 0); colour(BLUE, BLACK);
printf("%c", 212); printf("%c", 212);
for (i = 0; i < 78; i++) for (i = 0; i < 78; i++)
printf("%c", 205); printf("%c", 205);
@ -103,22 +101,22 @@ void Page_Sysop(char *String)
strcpy(Reason, temp); strcpy(Reason, temp);
} }
if (access("/tmp/.BusyChatting", F_OK) == 0) { // if (access("/tmp/.BusyChatting", F_OK) == 0) {
if((pBusy = fopen("/tmp/.BusyChatting", "r")) == NULL) // if((pBusy = fopen("/tmp/.BusyChatting", "r")) == NULL)
WriteError("Unable to open BusyChatting file", pTTY); // WriteError("Unable to open BusyChatting file", pTTY);
else { // else {
fscanf(pBusy, "%10s", temp); // fscanf(pBusy, "%10s", temp);
fclose(pBusy); // fclose(pBusy);
} // }
colour(13, 0); // colour(13, 0);
printf("%s%s\n", (char *) Language(152), temp); // printf("%s%s\n", (char *) Language(152), temp);
pout(10, 0, (char *) Language(153)); // pout(10, 0, (char *) Language(153));
Enter(2); // Enter(2);
Syslog('+', "SysOp was busy chatting to user on %s", temp); // Syslog('+', "SysOp was busy chatting to user on %s", temp);
Pause(); // Pause();
free(Reason); // free(Reason);
return; // return;
} // }
CFG.iMaxPageTimes--; CFG.iMaxPageTimes--;
@ -126,7 +124,7 @@ void Page_Sysop(char *String)
if (!DisplayFile((char *)"maxpage")) { if (!DisplayFile((char *)"maxpage")) {
/* If i is FALSE display hard coded message */ /* If i is FALSE display hard coded message */
Enter(1); Enter(1);
pout(15, 0, (char *) Language(154)); pout(WHITE, BLACK, (char *) Language(154));
Enter(2); Enter(2);
} }
@ -134,16 +132,16 @@ void Page_Sysop(char *String)
Pause(); Pause();
} else { } else {
locate(14, ((80 - strlen(String) ) / 2 - 2)); locate(14, ((80 - strlen(String) ) / 2 - 2));
pout(15, 0, (char *)"["); pout(WHITE, BLACK, (char *)"[");
pout(7, 0, String); pout(LIGHTGRAY, BLACK, String);
pout(15, 0, (char *)"]"); pout(WHITE, BLACK, (char *)"]");
locate(16, ((80 - CFG.iPageLength) / 2 - 2)); locate(16, ((80 - CFG.iPageLength) / 2 - 2));
pout(15, 0, (char *)"["); pout(WHITE, BLACK, (char *)"[");
colour(1, 0); colour(BLUE, BLACK);
for (i = 0; i < CFG.iPageLength; i++) for (i = 0; i < CFG.iPageLength; i++)
printf("%c", 176); printf("%c", 176);
pout(15, 0, (char *)"]"); pout(WHITE, BLACK, (char *)"]");
locate(16, ((80 - CFG.iPageLength) / 2 - 2) + 1); locate(16, ((80 - CFG.iPageLength) / 2 - 2) + 1);
@ -158,14 +156,15 @@ void Page_Sysop(char *String)
iOpenDevice = TRUE; iOpenDevice = TRUE;
} }
colour(9, 0); colour(LIGHTBLUE, BLACK);
for (i = 0; i < CFG.iPageLength; i++) { for (i = 0; i < CFG.iPageLength; i++) {
printf("\x07"); printf("\x07");
/* If there weren't any problems opening the writing device */ /* If there weren't any problems opening the writing device */
if(iOpenDevice) if (iOpenDevice) {
fprintf(pWritingDevice, "\x07"); fprintf(pWritingDevice, "\x07");
printf("%c", 219);
fflush(pWritingDevice); fflush(pWritingDevice);
}
printf("%c", 219);
fflush(stdout); fflush(stdout);
sleep(1); sleep(1);
if (access("/tmp/chatdev", R_OK) == 0) { if (access("/tmp/chatdev", R_OK) == 0) {
@ -176,9 +175,13 @@ void Page_Sysop(char *String)
} }
} }
if (iOpenDevice) {
fclose(pWritingDevice); fclose(pWritingDevice);
iOpenDevice = 0;
}
PageReason(); PageReason();
printf("\n\n\n"); printf("\n\n\n");
Pause();
if (strlen(Reason)) if (strlen(Reason))
SysopComment(Reason); SysopComment(Reason);
else else
@ -247,7 +250,7 @@ void PageReason()
char *String; char *String;
char *temp; char *temp;
temp = calloc(128, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
String = calloc(81, sizeof(char)); String = calloc(81, sizeof(char));
sprintf(temp, "%s/page.asc", CFG.bbs_txtfiles); sprintf(temp, "%s/page.asc", CFG.bbs_txtfiles);

View File

@ -87,8 +87,9 @@ int check_calllist(void)
if (pots_calls || isdn_calls || inet_calls) { if (pots_calls || isdn_calls || inet_calls) {
call_work = 0; call_work = 0;
for (tmp = alist; tmp; tmp = tmp->next) { for (tmp = alist; tmp; tmp = tmp->next) {
if (((tmp->callmode == CM_INET) && TCFG.max_tcp && internet) || if ((((tmp->callmode == CM_INET) && TCFG.max_tcp && internet) ||
((tmp->callmode == CM_ISDN) && isdn_lines) || ((tmp->callmode == CM_POTS) && pots_lines)) { ((tmp->callmode == CM_ISDN) && isdn_lines) || ((tmp->callmode == CM_POTS) && pots_lines)) &&
((tmp->flavors) & F_CALL)) {
call_work++; call_work++;
/* /*

View File

@ -460,8 +460,6 @@ int outstat()
*/ */
tmp->flavors &= ~F_CALL; tmp->flavors &= ~F_CALL;
} }
if ((tmp->flavors) & F_CALL)
flstr[10]='C';
if (tmp->t1) if (tmp->t1)
flstr[12] = tmp->t1; flstr[12] = tmp->t1;
if (tmp->t2) if (tmp->t2)
@ -520,6 +518,14 @@ int outstat()
} }
} }
if ((tmp->flavors) & F_CALL)
flstr[10]='C';
else
/*
* Safety, clear callmode.
*/
tmp->callmode = CM_NONE;
/* /*
* Show callresult for this node. * Show callresult for this node.
*/ */