W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

restarting libwww after calling HTProfile_delete

From: Raffaele Sena <raff@nuvomedia.com>
Date: Thu, 28 Jan 1999 12:03:57 -0800 (PST)
To: www-lib <www-lib@w3.org>
Message-ID: <Pine.LNX.4.05.9901281159490.5698-100000@localhost>

I changed a small application that was calling HTProfile_newHTMLClient
and HTProfile_delete into a library, to be linked by a main application.
The first approach was just changing the main program into my library
entrypoint, calling both functions every time my module is called.

When calling my module a second time, the library crashed because
some pointers to bad memory. They need to be reset in HTProfile_delete,
to allow the library to reinitialized them.

Here is the fix,

-- Raffaele

Index: HTProfil.c
RCS file: /sources/public/libwww/Library/src/HTProfil.c,v
retrieving revision 2.23
diff -b -r2.23 HTProfil.c
>       /* The following lists have been cleaned up by HTFormat_deleteAll
>       transfer_encodings = 0;
>       content_encodings = 0;
>       converters = 0;

Raffaele Sena
Senior Software Engineer ( "THE" Linux Guy :)
NuvoMedia, Inc.
310 Villa Street
Mt. View, CA 94041
Main:   +1.650.314.1200
Direct: +1.650.314.1255
Fax:    +1.650.314.1201

Received on Thursday, 28 January 1999 15:04:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:28 GMT