W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2002

Re: postform.c in a loop seg faults

From: Deshakulakarni, Chandra <Chandra_Deshakulakarni@bmc.com>
Date: Fri, 7 Jun 2002 13:00:57 -0500
Message-ID: <85BCB1287CF1D41197570090279A6A0D029056B0@ES02-AUS.bmc.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>
Cc: "'anibal@intelerad.com'" <anibal@intelerad.com>

I would suggest you to initialize and terminate LIBWWW only once
instead of doing it each time in the loop.

You can have two additional functions.


    /* Create a new premptive client */
    HTProfile_newNoCacheClient("TestApp", "1.0");

    /* Need our own trace and print functions */

    /* Get trace messages */
#if 0

    /* Add our own filter to update the history list */
    HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);

    /* Set the timeout for long we are going to wait for a response */

    HTTP_setBodyWriteDelay (250, 500);


    /* Terminate libwww */

Call lib_init() before your post loop and call lib_term()
after the loop.
You need to remove the init calls in your current post() function
and term call in your terminate_handler().

Hope this helps.

Received on Friday, 7 June 2002 14:01:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:55 UTC