Fixed comma issue in user/city registration
This commit is contained in:
parent
f94f93131f
commit
3ab5c3c405
@ -1,8 +1,12 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
v0.83.20 27-May-2006
|
v0.83.20 27-May-2006
|
||||||
|
|
||||||
|
libmbse.a:
|
||||||
|
Fixed comma issue in user/city registration.
|
||||||
|
|
||||||
mbmon:
|
mbmon:
|
||||||
Fixed a text message.
|
Fixed a text message.
|
||||||
|
|
||||||
@ -13,6 +17,7 @@ v0.83.20 27-May-2006
|
|||||||
Delete users from a server when server disconnects.
|
Delete users from a server when server disconnects.
|
||||||
Check for stopped tasks reverted to the old method without
|
Check for stopped tasks reverted to the old method without
|
||||||
signal handlers.
|
signal handlers.
|
||||||
|
Fixed comma issue in user/city registration.
|
||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
Added warning log for messages >= 32768 bytes.
|
Added warning log for messages >= 32768 bytes.
|
||||||
|
10
lib/clcomm.c
10
lib/clcomm.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Client/Server communications
|
* Purpose ...............: Client/Server communications
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2005
|
* Copyright (C) 1997-2006
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* 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)
|
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) {
|
if ((getenv("MBSE_ROOT")) == NULL) {
|
||||||
printf("Could not get the MBSE_ROOT environment variable\n");
|
printf("Could not get the MBSE_ROOT environment variable\n");
|
||||||
printf("Please set the environment variable ie:\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.
|
* some communications with the mbsed server.
|
||||||
*/
|
*/
|
||||||
mypid = getpid();
|
mypid = getpid();
|
||||||
u = xstrcpy(clencode(user));
|
if (socket_connect(user, myname, where) == -1) {
|
||||||
w = xstrcpy(clencode(where));
|
|
||||||
if (socket_connect(u, myname, w) == -1) {
|
|
||||||
printf("PANIC: cannot access socket\n");
|
printf("PANIC: cannot access socket\n");
|
||||||
exit(MBERR_INIT_ERROR);
|
exit(MBERR_INIT_ERROR);
|
||||||
}
|
}
|
||||||
free(w);
|
|
||||||
free(u);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -558,6 +558,8 @@ void reg_fre_r(char *buf)
|
|||||||
*/
|
*/
|
||||||
void get_reginfo_r(int first, char *buf)
|
void get_reginfo_r(int first, char *buf)
|
||||||
{
|
{
|
||||||
|
char *u, *p, *c, *d;
|
||||||
|
|
||||||
snprintf(buf, SS_BUFSIZE, "100:0;");
|
snprintf(buf, SS_BUFSIZE, "100:0;");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -575,11 +577,17 @@ void get_reginfo_r(int first, char *buf)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ((int)reginfo[entrypos].pid != 0) {
|
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;",
|
snprintf(buf, SS_BUFSIZE, "100:7,%d,%s,%s,%s,%s,%s,%d;",
|
||||||
reginfo[entrypos].pid, reginfo[entrypos].tty,
|
reginfo[entrypos].pid, reginfo[entrypos].tty,
|
||||||
reginfo[entrypos].uname, reginfo[entrypos].prg,
|
u, p, c, d, reginfo[entrypos].started);
|
||||||
reginfo[entrypos].city, reginfo[entrypos].doing,
|
free(u);
|
||||||
reginfo[entrypos].started);
|
free(p);
|
||||||
|
free(c);
|
||||||
|
free(d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user