M.Z.
This commit is contained in:
@@ -54,14 +54,15 @@ char *TecsSet(float temp) {
|
||||
}
|
||||
|
||||
char *TecsInit(char *host, int port) {
|
||||
if (port==0) port=9753;
|
||||
int iret;
|
||||
if (conn!=NULL) TeccClose(conn);
|
||||
NEW(conn, CocConn);
|
||||
if (host==NULL || *host=='\0') {
|
||||
ERR_I(CocInitClient(conn, "", port, rwCode, 0, ""));
|
||||
ERR_I(iret=CocInitClient(conn, "", port, rwCode, 0, ""));
|
||||
} else {
|
||||
ERR_I(CocInitClient(conn, host, port, rdCode, 0, ""));
|
||||
ERR_I(iret=CocInitClient(conn, host, port, rdCode, 0, ""));
|
||||
}
|
||||
if (iret==1) ErrShort("TECS_INIT: can not connect to TecsServer");
|
||||
return NULL;
|
||||
OnError:
|
||||
FREE(conn);
|
||||
|
||||
Reference in New Issue
Block a user