From d946ab6ad48e66b1ad9d53c546696b5a854e9c5b Mon Sep 17 00:00:00 2001 From: zolliker Date: Tue, 11 Oct 2005 10:49:17 +0000 Subject: [PATCH] - fixed bug introduced in last version --- tecs/tecs_cli.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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);