diff --git a/tecs/tecs_cli.c b/tecs/tecs_cli.c index 6447f62..9e9aa53 100644 --- a/tecs/tecs_cli.c +++ b/tecs/tecs_cli.c @@ -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);