Commit cbc7127d authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_pushhandler): Modified so that the members of the member

	"current" of IscHandlerList objects points to the IscHandler
	object where the callbacks that should be used exist.  Once
	that changes was done, there is no need for the "scb->fun"
	member, so it was removed.
(isc_pophandler): Adjusted accordingly.
parent adeb2670
......@@ -72,25 +72,36 @@ isc_pushhandler(IscSession *scb, IscHandler *hcb)
ISC_XNEW(ihl);
ihl->hcb = hcb;
ihl->old = scb->fun;
ihl->next = scb->handlers;
if (scb->handlers)
ihl->current = scb->handlers->current;
else
{
ihl->current.read = NULL;
ihl->current.write = NULL;
ihl->current.close = NULL;
ihl->current.poll = NULL;
ihl->current.accept = NULL;
ihl->current.destroy = NULL;
ihl->current.parse = NULL;
}
scb->handlers = ihl;
if (hcb->read)
scb->fun.read = ihl;
ihl->current.read = ihl;
if (hcb->write)
scb->fun.write = ihl;
ihl->current.write = ihl;
if (hcb->close)
scb->fun.close = ihl;
ihl->current.close = ihl;
if (hcb->poll)
scb->fun.poll = ihl;
ihl->current.poll = ihl;
if (hcb->accept)
scb->fun.accept = ihl;
ihl->current.accept = ihl;
if (hcb->destroy)
scb->fun.destroy = ihl;
ihl->current.destroy = ihl;
if (hcb->parse)
scb->fun.parse = ihl;
ihl->current.parse = ihl;
}
......@@ -106,7 +117,6 @@ isc_pophandler(IscSession *scb)
ip = scb->handlers;
scb->handlers = ip->next;
scb->fun = ip->old;
hcb = ip->hcb;
isc_free(ip);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment