Patch for HTProfil.c

We have been using the www-lib with xmlrpc in several C programs compiled
and run on Solaris 7 systems, and were receiving occasional bus errors
and core dumps that we localized to Library/src/HTEvtLst.c, in
the subroutine EventOrder_executeAndDelete().

Turning on WWW_TraceFlag we found the problem to be the re-use of a socket
that had previously been closed by HTChannel_deleteAll() in HTLibTerminate().
In between the first set of calls to the www libs and the later calls that had
the bus error, we were opening and closing various files on the system, so
when HTEventList_register was called again later, it was using a different
socket file descriptor; hence the problem.

The resolution was to make sure that HTEventList_unregisterAll() is
also called when the channels are deleted. Since xmlrpc-c was cleaning
up with a call to HTProfile_delete(), we just added that line
to that subroutine, and things work for us. However, there may be
a better location for this call. It's definitely a bug needing a patch
somewhere in lib-www. I hope this makes it into the next release!

			Arthur Smith (apsmith@aps.org)

cvs diff HTProfil.c
Index: HTProfil.c
===================================================================
RCS file: /sources/public/libwww/Library/src/HTProfil.c,v
retrieving revision 2.30
diff -r2.30 HTProfil.c
34a35,36
>       HTEventList_unregisterAll();
>

Received on Thursday, 6 February 2003 19:15:19 UTC