From fd5451e8fdfdfc88f0ae4090d6cc6e48981deae2 Mon Sep 17 00:00:00 2001 From: koennecke Date: Tue, 25 Oct 2016 17:03:21 +0200 Subject: [PATCH] Enhanced comments in asynnet Changed required privilege for chnaging the threshold from manager to user in counter.c Changed an output code in macro.c --- asynnet.c | 7 ++++++- counter.c | 2 +- macro.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/asynnet.c b/asynnet.c index 67f4d7c6..beac28c0 100644 --- a/asynnet.c +++ b/asynnet.c @@ -338,7 +338,12 @@ static int anetTestWrite(SocketDescriptor con) } return 1; } -/*--------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------- + There is something implicit in the return here: anetRead must return 0 + when the list of sockets changes. Otherwise ANETprocess cannot detect that it has + an invalid socket list and jump out. In all other cases anetRead must return 1 +-------------------------------------------------------------------------------*/ + static int anetRead(SocketDescriptor con) { int socke, handle, status; diff --git a/counter.c b/counter.c index 72c8aeac..32fd8312 100644 --- a/counter.c +++ b/counter.c @@ -1022,7 +1022,7 @@ int CountAction(SConnection * pCon, SicsInterp * pSics, void *pData, } break; case 15: - if (!SCMatchRights(pCon, usMugger)) { + if (!SCMatchRights(pCon, usUser)) { SCWrite(pCon, "ERROR: Insufficient privilege to set threshold", eError); return 0; diff --git a/macro.c b/macro.c index 0adebdf7..cf68f1bb 100644 --- a/macro.c +++ b/macro.c @@ -605,7 +605,7 @@ int InternalFileEval(SConnection * pCon, SicsInterp * pInter, void *pData, ClientPut is installed as a command to write data to the client from a server script. Syntax: ClientPut text outputcode - The output code is optional and and defaults to eStatus. + The output code is optional and and defaults to eLog. ---------------------------------------------------------------------------*/ #include "outcode.h"