diff --git a/tecs/six.c b/tecs/six.c index 635a785..be34d2c 100644 --- a/tecs/six.c +++ b/tecs/six.c @@ -587,6 +587,7 @@ int main (int argc, char *argv[]) { char *pnam[4]={"0", "MANAGER", "user", "spy"}; char *hostArg; char *subcmd; + char *service; atexit(term_off); port=-1; @@ -664,7 +665,12 @@ int main (int argc, char *argv[]) { } } } - home = InstrHost(servername, hostArg, instr, sizeof instr + if (*sim != '\0') { + service = "simsics"; + } else { + service = servername; + } + home = InstrHost(service, hostArg, instr, sizeof instr , host, sizeof host, &port); ent = gethostbyname(host); if (!ent) { @@ -885,6 +891,8 @@ int main (int argc, char *argv[]) { if (iret == sock[0] || iret == sock[1]) { ERR_P(p=readWrite(500,0,NULL)); } + } else if (iret<0) { + ERR_MSG("term_get_line failed"); } if (strcmp(p, "0") == 0) { term_clear();