The logical nodenumber for the bbs is now issued by mbtask
This commit is contained in:
parent
2343ed5a8b
commit
61f89c0cfc
@ -10,6 +10,10 @@ v0.61.4 11-Aug-2004
|
||||
thumbnails if supported by your system.
|
||||
Start mbsetup, enter global setup and leave.
|
||||
|
||||
libmbse.a:
|
||||
The socket_connect function now sets the global nodenumber from
|
||||
the reply of mbtask.
|
||||
|
||||
libnodelist.a:
|
||||
Removed some debug logging.
|
||||
|
||||
@ -59,6 +63,9 @@ v0.61.4 11-Aug-2004
|
||||
is given to joe.
|
||||
In Quick_Bye reset all signal handlers to prevent that die() is
|
||||
called in case something goes wrong during Quick_Bye.
|
||||
The fake nodenumber is now obtained from mbtask instead of a
|
||||
count of tty line records so the used nodenumbers will be a lot
|
||||
lower then before.
|
||||
|
||||
mbnewusr:
|
||||
During program exit, it tried to remove the wrong socket to
|
||||
@ -70,6 +77,8 @@ v0.61.4 11-Aug-2004
|
||||
mbtask:
|
||||
Tried to call nodes during ZMH or during a Tyx window when mail
|
||||
was on hold.
|
||||
The comm protocol reply to the AINI command now contains a fake
|
||||
node number.
|
||||
|
||||
mbsetup:
|
||||
Changed nodes screens to have a separate uplink managers setup
|
||||
|
3
TODO
3
TODO
@ -161,6 +161,3 @@ mbsetup:
|
||||
format, if a filegate list is installed and the filegate switch
|
||||
setting is wrong, a lot of wrong areas will be created.
|
||||
|
||||
N: Sort tty records or use another method to create node numbers.
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<div align="right"><h5>Last update 20-Mar-2004</h5></div>
|
||||
<div align="right"><h5>Last update 09-Sep-2004</h5></div>
|
||||
<div align="center"><H1>mbtask - MBSE BBS Taskmanager</H1></div>
|
||||
|
||||
<H3>Sysopsis.</H3>
|
||||
@ -195,7 +195,7 @@ Sxxx Status commands.
|
||||
Group A, Accounting.
|
||||
|
||||
Command: AINI:5,pid,tty,uid,prg,city; Initialize connection, and who am I.
|
||||
Reply: 100:0; Ok.
|
||||
Reply: 100:1,line; Ok, linen is a logical linennumber for the bbs.
|
||||
200:1,Syntax Error; Error.
|
||||
|
||||
Command: ADOI:2,pid,doing; What am I doing right now.
|
||||
|
10
lib/client.c
10
lib/client.c
@ -51,6 +51,7 @@ int socket_connect(char *user, char *prg, char *city)
|
||||
{
|
||||
int s;
|
||||
static char buf[SS_BUFSIZE], tty[18];
|
||||
char *tmp;
|
||||
|
||||
myname = prg;
|
||||
|
||||
@ -123,12 +124,19 @@ int socket_connect(char *user, char *prg, char *city)
|
||||
}
|
||||
|
||||
strcpy(buf, socket_receive());
|
||||
if (strncmp(buf, "100:0;", 6) != 0) {
|
||||
if (strncmp(buf, "100:1,", 6) != 0) {
|
||||
printf("AINI not acknowledged by the server\n");
|
||||
sock = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract nodenumber from the reply.
|
||||
*/
|
||||
tmp = strtok(buf, ",");
|
||||
tmp = strtok(NULL, ";");
|
||||
iNode = atoi(tmp);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,6 @@ int iExpired; /* Check if users time ran out */
|
||||
char sUnixName[9]; /* Unix login name */
|
||||
time_t Time2Go; /* Calculated time to force logout */
|
||||
struct tm *l_date; /* Structure for Date */
|
||||
int iNode; /* Current node number */
|
||||
|
||||
time_t ltime;
|
||||
time_t Time_Now;
|
||||
|
@ -1964,15 +1964,6 @@ struct _route {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
typedef struct _srv_auth {
|
||||
struct _srv_auth *next;
|
||||
char *hostname;
|
||||
char *authcode;
|
||||
} srv_auth;
|
||||
*/
|
||||
|
||||
|
||||
extern char SigName[32][16];
|
||||
|
||||
|
||||
@ -2007,6 +1998,7 @@ char *printablec(char);
|
||||
/*
|
||||
* From client.c
|
||||
*/
|
||||
int iNode; /* Current node number */
|
||||
int socket_connect(char *, char *, char *);
|
||||
int socket_send(char *);
|
||||
char *socket_receive(void);
|
||||
|
@ -190,14 +190,12 @@ int main(int argc, char **argv)
|
||||
* line number, this will be used by doors.
|
||||
*/
|
||||
sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
||||
iNode = 0;
|
||||
if ((pTty = fopen(temp, "r")) == NULL) {
|
||||
WriteError("Can't read %s", temp);
|
||||
} else {
|
||||
fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, pTty);
|
||||
|
||||
while (fread(&ttyinfo, ttyinfohdr.recsize, 1, pTty) == 1) {
|
||||
iNode++;
|
||||
if (strcmp(ttyinfo.tty, pTTY) == 0)
|
||||
break;
|
||||
}
|
||||
|
@ -106,13 +106,14 @@ char *exe_cmd(char *in)
|
||||
* The A(counting) commands.
|
||||
*
|
||||
* AINI:5,pid,tty,user,program,city;
|
||||
* 100:0;
|
||||
* 100:1,linenr;
|
||||
* 200:1,Syntax Error;
|
||||
*/
|
||||
if (strncmp(cmd, "AINI", 4) == 0) {
|
||||
if (reg_newcon(token) != -1)
|
||||
if ((result = reg_newcon(token)) != -1) {
|
||||
sprintf(obuf, "100:1,%d;", result);
|
||||
return obuf;
|
||||
else {
|
||||
} else {
|
||||
stat_inc_serr();
|
||||
return ebuf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user