Added mailer counter to mbtask
This commit is contained in:
parent
ce9ccc8869
commit
640eed0ec9
@ -4681,6 +4681,7 @@ v0.33.20 10-Feb-2002
|
||||
lines are free to use for dialout.
|
||||
For ISDN and POTS calls, mbtask now decides which tty to use,
|
||||
mbcico gets the tty to use as option on the commandline.
|
||||
Keeps track of the number of mailers running.
|
||||
|
||||
mbcico:
|
||||
Fixed binkp driver to accept incoming unprotected sessions.
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
extern reg_info reginfo[MAXCLIENT]; /* Array with clients */
|
||||
static int entrypos = 0; /* Status pointer */
|
||||
static int mailers = 0; /* Registered mailers */
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@ -100,8 +101,10 @@ int reg_newcon(char *data)
|
||||
*/
|
||||
reginfo[retval].silent = 1;
|
||||
|
||||
tasklog('-', "Registered client pgm \"%s\", pid %s, slot %d", prg, pid, retval);
|
||||
stat_inc_clients();
|
||||
if (strcmp(prg, (char *)"mbcico") == 0)
|
||||
mailers++;
|
||||
tasklog('-', "Registered client pgm \"%s\", pid %s, slot %d, mailers %d", prg, pid, retval, mailers);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -117,7 +120,9 @@ int reg_closecon(char *data)
|
||||
if ((rec = reg_find(pid)) == -1)
|
||||
return -1;
|
||||
|
||||
tasklog('-', "Unregistered client pgm \"%s\", pid %s, slot %d", reginfo[rec].prg, pid, rec);
|
||||
if (strcmp(reginfo[rec].prg, (char *)"mbcico") == 0)
|
||||
mailers--;
|
||||
tasklog('-', "Unregistered client pgm \"%s\", pid %s, slot %d, mailers %d", reginfo[rec].prg, pid, rec, mailers);
|
||||
memset(®info[rec], 0, sizeof(reg_info));
|
||||
stat_dec_clients();
|
||||
return 0;
|
||||
@ -138,7 +143,10 @@ void reg_check(void)
|
||||
if (reginfo[i].pid) {
|
||||
if (kill(reginfo[i].pid, 0) == -1) {
|
||||
if (errno == ESRCH) {
|
||||
tasklog('?', "Stale registration found for pid %d (%s)", reginfo[i].pid, reginfo[i].prg);
|
||||
if (strcmp(reginfo[i].prg, (char *)"mbcico") == 0)
|
||||
mailers--;
|
||||
tasklog('?', "Stale registration found for pid %d (%s), mailers now %d",
|
||||
reginfo[i].pid, reginfo[i].prg, mailers);
|
||||
memset(®info[i], 0, sizeof(reg_info));
|
||||
stat_dec_clients();
|
||||
}
|
||||
|
Reference in New Issue
Block a user