- added keyword "start" for host parameter
This commit is contained in:
@@ -39,6 +39,7 @@ static int logIt=0, use_stdout=0;
|
|||||||
static char serverId[32]="tecs";
|
static char serverId[32]="tecs";
|
||||||
static int msecTmo=5000;
|
static int msecTmo=5000;
|
||||||
static char host[64]="";
|
static char host[64]="";
|
||||||
|
static char starthost[64]="";
|
||||||
static int port=9753;
|
static int port=9753;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -3609,6 +3610,7 @@ int main(int argc, char *argv[]) {
|
|||||||
} else if ('h'==opt) {
|
} else if ('h'==opt) {
|
||||||
i++;
|
i++;
|
||||||
str_copy(host, argv[i]);
|
str_copy(host, argv[i]);
|
||||||
|
str_copy(starthost, argv[i]);
|
||||||
} else if ('p'==opt) {
|
} else if ('p'==opt) {
|
||||||
i++;
|
i++;
|
||||||
port=atoi(argv[i]);
|
port=atoi(argv[i]);
|
||||||
@@ -3739,6 +3741,9 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
if (ser==NULL) {
|
if (ser==NULL) {
|
||||||
CocHandleRequests(msecTmo, 0);
|
CocHandleRequests(msecTmo, 0);
|
||||||
|
if (strcmp(host, "start") == 0) {
|
||||||
|
str_copy(host, starthost);
|
||||||
|
}
|
||||||
ser=SerOpen(host, msecTmo, IdleHdl);
|
ser=SerOpen(host, msecTmo, IdleHdl);
|
||||||
if (ser==NULL) {
|
if (ser==NULL) {
|
||||||
str_copy(statusBuf, "can not connect to serial port server or terminal server");
|
str_copy(statusBuf, "can not connect to serial port server or terminal server");
|
||||||
|
|||||||
Reference in New Issue
Block a user