Fixed missing caller id on ISDN lines

This commit is contained in:
Michiel Broek 2002-12-05 20:44:38 +00:00
parent 91868bcec7
commit 6857476bf8
2 changed files with 136 additions and 136 deletions

View File

@ -55,6 +55,7 @@ v0.35.06
Uploaded files will now also have a 8.3 hard link to the long Uploaded files will now also have a 8.3 hard link to the long
filename. filename.
Filesearch on filename now uses regexp to find the files. Filesearch on filename now uses regexp to find the files.
The caller id didn't show up when the info was available.
mbfido: mbfido:
TIC file forwarding now uses a list of qualified systems to TIC file forwarding now uses a list of qualified systems to

View File

@ -58,9 +58,8 @@ time_t t_start;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
FILE *pTty; FILE *pTty;
char *p, *tty; char *p, *tty, temp[PATH_MAX];
int i; int i;
char temp[PATH_MAX];
#ifdef MEMWATCH #ifdef MEMWATCH
mwInit(); mwInit();
@ -74,7 +73,7 @@ int main(int argc, char **argv)
*/ */
sUnixName[0] = '\0'; sUnixName[0] = '\0';
if (getenv("LOGNAME") != NULL) { if (getenv("LOGNAME") != NULL) {
strcpy(sUnixName, getenv("LOGNAME")); strncpy(sUnixName, getenv("LOGNAME"), 8);
} else if (getenv("USER") != NULL) { } else if (getenv("USER") != NULL) {
strcpy(sUnixName, getenv("USER")); strcpy(sUnixName, getenv("USER"));
} else { } else {
@ -115,7 +114,7 @@ int main(int argc, char **argv)
if ((p = getenv("CONNECT")) != NULL) if ((p = getenv("CONNECT")) != NULL)
Syslog('+', "CONNECT %s", p); Syslog('+', "CONNECT %s", p);
if ((p = getenv("CALLER_ID")) != NULL) if ((p = getenv("CALLER_ID")) != NULL)
if (!strncmp(p, "none", 4)) if (strncmp(p, "none", 4))
Syslog('+', "CALLER %s", p); Syslog('+', "CALLER %s", p);
/* /*
@ -180,10 +179,10 @@ int main(int argc, char **argv)
printf("%s\n\n", COPYRIGHT); printf("%s\n\n", COPYRIGHT);
/* /*
* Check if this port is available. * Check if this port is available. In iNode we set a fake
* line number, this will be used by doors.
*/ */
sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
iNode = 0; iNode = 0;
if ((pTty = fopen(temp, "r")) == NULL) { if ((pTty = fopen(temp, "r")) == NULL) {
WriteError("Can't read %s", temp); WriteError("Can't read %s", temp);
@ -205,7 +204,7 @@ int main(int argc, char **argv)
Syslog('b', "Node number %d", iNode); Syslog('b', "Node number %d", iNode);
/* /*
* Ask whether to display Connect String * Display Connect String if turned on.
*/ */
if (CFG.iConnectString) { if (CFG.iConnectString) {
/* Connected on port */ /* Connected on port */