- bug fix

This commit is contained in:
zolliker
2010-04-15 08:57:38 +00:00
parent 37f4fea6f4
commit ffa378b60d
2 changed files with 5 additions and 2 deletions

6
ease.c
View File

@ -760,7 +760,7 @@ static int EaseInit(SConnection * pCon, EaseBase * eab, int argc,
SCWrite(pCon, "ERROR: host name too long", eError);
return 0;
}
strlcpy(buf, argv[0], i);
strncpy(buf, argv[0], i);
buf[i] = '\0';
host = buf;
} else if (argc == 2) { /* host port syntax */
@ -975,7 +975,9 @@ int EaseRestartWrapper(void *object, void *userarg, int argc, char *argv[])
eab->ser->pHost = strdup(host);
eab->ser->iPort = port;
}
EaseStop(eab);
if (eab->task) {
EaseStop(eab);
}
EaseRestart(eab);
return 0;
}

View File

@ -568,6 +568,7 @@ static int ParExecute(SConnection * con, SicsInterp * sics, void *object,
} else {
if (argc == 2) {
ctx->enumText = 0;
ctx->argc = 0;
ParDo(con, o, PAR_SHOW, argv[1]);
} else {
ctx->argc = argc - 2;