W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1998

Re: Problems with PUT

From: olga <olga@goliath.eai.com>
Date: Wed, 26 Aug 1998 12:38:03 -0500 (CDT)
Message-ID: <XFMail.980826123803.olga@eai.com>
To: Henrik Frystyk Nielsen <frystyk@w3.org>
Cc: www-lib@w3.org, olga@goliath.eai.com

Thanks for answering.

I am using the event loop with the NOCacheClient profile, which is nonblocking
(as it is said in the documentation).

The examples I have seen (HTLine, PUT, some other small examples) are showing
the single request processing. Are there any that do multiple? 

If the callback function deletes the profile and returns HT_LOADED, then
execution returns from the event loop, but the second call to the function
(with the same parameters) gives me core dumped.

What is happening is mystery for me - the old profile was deleted and new
created - why not to work???

There is basically the function (written after PUT example):

BOOL myWWWLib_H::putURL(const char* url, const char* local_filename)
{       ... source & dest initialization...
        HTProfile_newNoCacheClient(APP_NAME, APP_VERSION);
        HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);
        request = HTRequest_new();

        ret = HTPutDocumentAnchor( source, (HTAnchor *) destination, request);
        ... cleaning
        return ret;

Thanks a lot for the help.

        Olga Antropova.

On 26-Aug-98 Henrik Frystyk Nielsen wrote:
> At 10:33 25/08/1998 -0500, olga wrote:
>>the first putURL (or getURL) request is processed correctly and then the
>>programs hangs... (even though multiple get requests are processed w/o any
>>I suspect that the problem is in the callback function(?), but I do not
> know how
>>to write it correctly.
> Are you using non-blocking sockets and an event loop? In order to PUT in
> libwww you really need to not block on socket calls as you have to be able
> to read and write at the same time.
> Henrik
> --
> Henrik Frystyk Nielsen,
> World Wide Web Consortium
> http://www.w3.org/People/Frystyk

E-Mail: olga <olga@eai.com>
Date: 26-Aug-98
Time: 11:42:48

This message was sent by XFMail
Received on Wednesday, 26 August 1998 13:35:18 UTC

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