Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla/ntserv
Date: Thursday June 3, 1999 @ 5:09
Author: cameron
Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv4587/ntserv
Modified Files:
daemonII.c redraw.c socket.c
Log Message:
* ntserv/socket.c (check_mesgs): change response to messages to GOD
so that players will know that it is not GOD replying but a logger,
and also suggest a return electronic mail address.
* ntserv/daemonII.c (udplayers): I fear the calculation of the
outfitdelay may actually be incorrect, because lots show that many
of the ghostbusts on login are actually POUTFIT SIGTERMs.
* ntserv/socket.c (doRead): re-inserted report of read() from client
error which had been previously removed because it happened too much,
but changed the error level to 9 to avoid seeing it. I'm expecting
to find that this is the point where most of the ghostbusts I'm
seeing on continuum actually happen; and I want to see if it's EPIPE.
* ntserv/redraw.c (intrupt): remove superfluous reset of testtime,
it had been tested for zero two lines above.
* ntserv/socket.c (dequeue): changed kill(getpid(),15) to an exit().
****************************************
Index: Vanilla/ntserv/daemonII.c
diff -u Vanilla/ntserv/daemonII.c:1.21 Vanilla/ntserv/daemonII.c:1.22
--- Vanilla/ntserv/daemonII.c:1.21 Wed Jun 2 23:57:02 1999
+++ Vanilla/ntserv/daemonII.c Thu Jun 3 05:09:47 1999
@@ -306,7 +306,8 @@
#endif
#define GHOSTTIME (30 * 1000000 / UPDATE) /* 30 secs */
-#define OUTFITTIME (6 * AUTOQUIT * 1000000 / UPDATE) /* 6 * AQ secs */
+#define OUTFITTIME (3 * AUTOQUIT * 1000000 / UPDATE) /* three minutes */
+#define LOGINTIME (6 * AUTOQUIT * 1000000 / UPDATE) /* six minutes */
#define HUNTERKILLER (-1)
#define TERMINATOR (-2) /* Terminator */
@@ -723,6 +724,9 @@
case POUTFIT:
switch (j->p_whydead) {
+ case KLOGIN:
+ outfitdelay = LOGINTIME;
+ break;
case KQUIT:
case KGHOST:
case KPROVIDENCE:
@@ -735,7 +739,8 @@
}
if (++(j->p_ghostbuster) > outfitdelay) {
- ERROR(4,("%s: ship in POUTFIT too long\n", j->p_mapchars));
+ ERROR(4,("%s: ship in POUTFIT too (%d) long\n",
+ j->p_mapchars, outfitdelay));
/* Force the player out of the game */
saveplayer(j);
if (j->p_process > 1) {
Index: Vanilla/ntserv/redraw.c
diff -u Vanilla/ntserv/redraw.c:1.6 Vanilla/ntserv/redraw.c:1.7
--- Vanilla/ntserv/redraw.c:1.6 Tue May 25 06:33:56 1999
+++ Vanilla/ntserv/redraw.c Thu Jun 3 05:09:48 1999
@@ -42,7 +42,6 @@
testtime--;
if (testtime==0) {
if (bypassed) { /* Deal with .bypass entries */
- testtime = 0;
pmessage2(0, MALL | MJOIN, "GOD->ALL", me->p_no,
"%s %.16s is not using an RSA client",
ranks[me->p_stats.st_rank].name,
Index: Vanilla/ntserv/socket.c
diff -u Vanilla/ntserv/socket.c:1.13 Vanilla/ntserv/socket.c:1.14
--- Vanilla/ntserv/socket.c:1.13 Mon May 31 20:53:22 1999
+++ Vanilla/ntserv/socket.c Thu Jun 3 05:09:48 1999
@@ -1,4 +1,4 @@
-/* $Id: socket.c,v 1.13 1999/06/01 01:53:22 cameron Exp $
+/* $Id: socket.c,v 1.14 1999/06/03 10:09:48 cameron Exp $
*/
/*
@@ -368,7 +368,7 @@
shutdown(sock,2);
sock= -1;
}
- ERROR(3,("%s start connect to %s:%d\n", whoami(), machine, port));
+ ERROR(3,("%s: start connect to %s:%d\n", whoami(), machine, port));
if ((ns=socket(AF_INET, SOCK_STREAM, 0)) < 0) {
ERROR(1,("%s: socket() failed, %s\n", whoami(), strerror(errno)));
@@ -1004,11 +1004,9 @@
/* Read info from the xtrek server */
count=read(asock,buf,BUFSIZ*2);
if (count<=0) {
-#ifdef DEBUG
/* (this happens when the client hits 'Q') */
- ERROR(1,("%s: read() failed, %s\n",
+ ERROR(9,("%s: read() failed, %s\n",
whoami(), strerror(errno)));
-#endif
if (asock == udpSock) {
if (errno == ECONNREFUSED) {
struct sockaddr_in addr;
@@ -2622,7 +2620,7 @@
#ifdef FATDIAG
if (nextfatp == fatp) {
ERROR(1,("Hey! nextfatp == fatp!\n"));
- kill(getpid(), 15);
+ exit(3);
}
#endif
if (fatp->pkt_size < bytesleft) {
@@ -2682,7 +2680,7 @@
if ((fatlist[i].head == NULL && fatlist[i].tail != NULL) ||
(fatlist[i].head != NULL && fatlist[i].tail == NULL)) {
ERROR(1,("before!\n"));
- kill(getpid(), 15);
+ exit(3);
}
}
#endif
@@ -2726,7 +2724,7 @@
if ((fatlist[i].head == NULL && fatlist[i].tail != NULL) ||
(fatlist[i].head != NULL && fatlist[i].tail == NULL)) {
ERROR(1,("after: %d %.8lx %.8lx\n", i, fatlist[i].head, fatlist[i].tail));
- kill(getpid(), 15);
+ exit(3);
}
}
#endif
@@ -2824,17 +2822,33 @@
}
if(loggod && ((strncasecmp(packet->mesg, "god:", 4) == 0) ||
(packet->group & MGOD))){
+ static int counter = 0;
+
if(!glog) {
ERROR(1,( "ntserv: ERROR, null glog file descriptor\n"));
return 0;
}
fprintf(glog, "%s\n", buf);
fflush(glog);
+ counter++;
+
/* response */
- sprintf(addrb, "GOD->%c%c", teamlet[me->p_team], shipnos[me->p_no]);
- pmessage(me->p_no, MINDIV, addrb, "Thank you, %s, for your comments.",
- me->p_login);
- pmessage(me->p_no, MINDIV, addrb, "Your message has been logged.");
+ sprintf(addrb, "LOG->%s", me->p_mapchars);
+ switch (counter) {
+ case 1:
+ pmessage(me->p_no, MINDIV, addrb,
+ "Noted. Thank you, %s, for your comments.",
+ me->p_login);
+ break;
+ case 2:
+ pmessage(me->p_no, MINDIV, addrb,
+ "Please leave your return email address too!");
+ break;
+ case 3:
+ break;
+ default:
+ pmessage(me->p_no, MINDIV, addrb, "Your message has been logged.");
+ }
}
}
return 0; /* continue processing all messages */