AOL Webserver - Ns_RegisterAtReady, NsRunAtReadyProcs

This is Interesting: Free IT Magazines  
Home > Archive > AOL Webserver > October 2007 > Ns_RegisterAtReady, NsRunAtReadyProcs





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Ns_RegisterAtReady, NsRunAtReadyProcs
Tom Jackson

2007-10-17, 7:11 am

Okay, my first attempt to send this didn't make it to the list...sorry if this
becomes a duplicate.

Code was added to driver.c about 9 months ago reportedly to fix a race
condition of some sort. The Bug description (1615787) is at:
http://sourceforge.net/tracker/inde...ail&aid=1615787]&group_id=3152&atid=103152

The code added to callbacks.c are the two undocumented functions:

void *
Ns_RegisterAtReady(Ns_Callback *proc, void *arg)
{
return RegisterCallback(&firstReady, proc, arg);
}

void
NsRunAtReadyProcs(void)
{
Ns_Log(Debug, "************NsRunAtReadyProcs running****");
RunCallbacks(firstReady);
}


The block/context of code added to driver.c is this:

/*
* Register an at-ready callback to trigger the poll.
*/

Ns_RegisterAtReady(TriggerDriver, drvPtr);

/*
* Loop forever until signalled to shutdown and all
* connections are complete and gracefully closed.
*/



This all looks great, except for the fact that the NsRunAtReadyProcs proc is
never called.

The original bug was for 4.0.10, with a different setup:

Ns_RegisterAtReady(SockTrigger,NULL);

Question is why the code was put in, undocumented and unused. It also refers
to a bug from another version of AOLserver, not 4.5. Is NsRunAtReadyProcs
being used somewhere? If not, maybe it should be removed; if used, we need to
add some documentation.

tom jackson


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com