From 18008531630dadea9ef6823195fc9f57056c52bc Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 16 Mar 1992 14:47:43 +0000 Subject: [PATCH] disconnect on bad message --- src/rsrv/camessage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 9f0921816..fa2a3fa08 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -40,6 +40,8 @@ * .06 joh 110491 lock added for IOC_CLAIM_CIU command * .07 joh 021292 Better diagnostics * .08 joh 021492 use lstFind() to verify chanel in clear_channel() + * .09 joh 031692 dont send exeception to the client if bad msg + * detected- just disconnect instead */ #include @@ -319,10 +321,22 @@ camessage(client, recv) UNLOCK_CLIENT(client); break; default: + logMsg("CAS: bad msg detected\n"); log_header(mp, nmsg); +#if 0 + /* + * most clients dont recover + * from this + */ LOCK_CLIENT(client); send_err(mp, ECA_INTERNAL, client, "Invalid Msg"); UNLOCK_CLIENT(client); +#endif + /* + * returning ERROR here disconnects + * the client with the bad message + */ + logMsg("CAS: forcing disconnect ...\n"); return ERROR; }