This commit is contained in:
cvs
2002-08-22 11:06:28 +00:00
parent b7f5cd8d24
commit ac002aca73
7 changed files with 103 additions and 41 deletions

View File

@@ -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);