Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla/ntserv
Date: Saturday June 19, 1999 @ 3:24
Author: unbelver
Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv7327
Modified Files:
solicit.c
Log Message:
Was shown an example of a garbled login. Added fix_name to login as
well.
--Carlos V.
****************************************
Index: Vanilla/ntserv/solicit.c
diff -u Vanilla/ntserv/solicit.c:1.9 Vanilla/ntserv/solicit.c:1.10
--- Vanilla/ntserv/solicit.c:1.9 Wed Jun 16 16:07:04 1999
+++ Vanilla/ntserv/solicit.c Sat Jun 19 03:24:20 1999
@@ -95,7 +95,7 @@
int i, nplayers=0, nfree=0;
char packet[MAXMETABYTES];
/* static char prior[MAXMETABYTES];*/
- char *fixed_name;
+ char *fixed_name, *fixed_login;
char *here = packet;
time_t now = time(NULL);
int gamefull = 0; /* is the game full? */
@@ -210,6 +210,7 @@
#endif
continue;
fixed_name = name_fix(players[j].p_name); /*get rid of non-printables*/
+ fixed_login = name_fix(players[j].p_login);
sprintf(here, "%c\n%c\n%d\n%d\n%s\n%s@%s\n",
/* number */ players[j].p_mapchars[1],
/* team */ players[j].p_mapchars[0],
@@ -218,10 +219,11 @@
/* rank */ players[j].p_stats.st_rank,
/* ??? note change from design, rank number not string */
/* name */ (fixed_name) ? fixed_name : players[j].p_name,
- /* user */ players[j].p_login,
+ /* user */ (fixed_login) ? fixed_login : players[j].p_login,
/* host */ players[j].p_monitor );
here += strlen(here);
- free(fixed_name);
+ free(fixed_name); /*because name_fix malloc()s a string */
+ free(fixed_login);
}
}