diff --git a/ChangeLog b/ChangeLog index 5698f3d6..48afe24f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ $Id$ + v0.83.20 27-May-2006 + libmbse.a: + Fixed comma issue in user/city registration. + mbmon: Fixed a text message. @@ -13,6 +17,7 @@ v0.83.20 27-May-2006 Delete users from a server when server disconnects. Check for stopped tasks reverted to the old method without signal handlers. + Fixed comma issue in user/city registration. mbfido: Added warning log for messages >= 32768 bytes. diff --git a/lib/clcomm.c b/lib/clcomm.c index cc259101..6f0dd18c 100644 --- a/lib/clcomm.c +++ b/lib/clcomm.c @@ -4,7 +4,7 @@ * Purpose ...............: Client/Server communications * ***************************************************************************** - * Copyright (C) 1997-2005 + * Copyright (C) 1997-2006 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -102,8 +102,6 @@ char *xstrcat(char *src, char *add) void InitClient(char *user, char *myname, char *where, char *logfname, int loggr, char *err, char *mgr, char *debug) { - char *u, *w; - if ((getenv("MBSE_ROOT")) == NULL) { printf("Could not get the MBSE_ROOT environment variable\n"); printf("Please set the environment variable ie:\n"); @@ -126,14 +124,10 @@ void InitClient(char *user, char *myname, char *where, char *logfname, int loggr * some communications with the mbsed server. */ mypid = getpid(); - u = xstrcpy(clencode(user)); - w = xstrcpy(clencode(where)); - if (socket_connect(u, myname, w) == -1) { + if (socket_connect(user, myname, where) == -1) { printf("PANIC: cannot access socket\n"); exit(MBERR_INIT_ERROR); } - free(w); - free(u); } diff --git a/mbtask/taskregs.c b/mbtask/taskregs.c index 6d46a724..47e4a1d7 100644 --- a/mbtask/taskregs.c +++ b/mbtask/taskregs.c @@ -558,6 +558,8 @@ void reg_fre_r(char *buf) */ void get_reginfo_r(int first, char *buf) { + char *u, *p, *c, *d; + snprintf(buf, SS_BUFSIZE, "100:0;"); /* @@ -575,11 +577,17 @@ void get_reginfo_r(int first, char *buf) return; if ((int)reginfo[entrypos].pid != 0) { + u = xstrcpy(clencode(reginfo[entrypos].uname)); + p = xstrcpy(clencode(reginfo[entrypos].prg)); + c = xstrcpy(clencode(reginfo[entrypos].city)); + d = xstrcpy(clencode(reginfo[entrypos].doing)); snprintf(buf, SS_BUFSIZE, "100:7,%d,%s,%s,%s,%s,%s,%d;", reginfo[entrypos].pid, reginfo[entrypos].tty, - reginfo[entrypos].uname, reginfo[entrypos].prg, - reginfo[entrypos].city, reginfo[entrypos].doing, - reginfo[entrypos].started); + u, p, c, d, reginfo[entrypos].started); + free(u); + free(p); + free(c); + free(d); return; } }