fix for an event handling bug in scotty-2.0.2

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 12 Feb 1996 21:24:09 +0100

Hi!

Oliver Goldman <goldman@alantec.com> reported a bug in scotty-2.0.2
which can cause core dumps if you are processing events (e.g. calling
update) from a callback of an asynchronous SNMP request. Below is a
fix that should cure this problem.

Juergen

*** snmpUtil.c-orig Fri Feb 9 20:15:37 1996
--- snmpUtil.c Fri Feb 9 20:15:16 1996
***************
*** 748,753 ****
--- 748,756 ----
for (p = session->requestList, q = NULL; p != NULL; q = p,p = p->nextPtr) {
if (p == request) break;
}
+
+ if (p == NULL) return;
+
if (q == NULL) {
session->requestList = p->nextPtr;
} else {