- fixed bug introduced in last version

This commit is contained in:
zolliker
2005-10-11 10:49:17 +00:00
parent 544dd37279
commit d946ab6ad4

View File

@ -18,6 +18,8 @@ pTecsClient TeccStart(char *startcmd, char *host, int port) {
CocConn *conn;
int iret;
/* called by tecs client -> set write access later by function tecs_rights */
NEW(conn, CocConn);
ERR_I(iret=CocInitClient(conn, host, port, rdCode, 0, startcmd));
if (iret==1) ErrShort("TECS_INIT: can not connect to TecsServer");
@ -31,11 +33,13 @@ pTecsClient TeccInit(char *startcmd, int port) {
CocConn *conn=NULL;
int iret;
/* called by sics server -> always read and write */
NEW(conn, CocConn);
if (startcmd[0]=='#') {
ERR_I(iret=CocInitClient(conn, startcmd+1, port, rdCode, 0, ""));
if (startcmd[0]=='#') { /* obsolete */
ERR_I(iret=CocInitClient(conn, startcmd+1, port, rwCode, 0, ""));
} else {
ERR_I(iret=CocInitClient(conn, "", port, rdCode, 0, startcmd));
ERR_I(iret=CocInitClient(conn, "", port, rwCode, 0, startcmd));
}
if (iret==1) ErrShort("TECS_INIT: can not connect to TecsServer");
return((pTecsClient)conn);