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

synchronous put

From: Tom M. Kroeger <tmk@dascom.com>
Date: 10 Jul 1998 16:33:47 -0700
To: www-lib@w3.org
Message-ID: <usok9e0x0.fsf@dascom.com>
 I have been having some trouble trying to get put to work in
a synchronous manner (call some HTPutxxxx and when it returns
the document was put or failed).

When I use the following:
    HTProfile_newPreemptiveClient("TestApp", "1.0");
    request = HTRequest_new();

    if (argc == 3) {
        char * filename = argv[2];
        if ( filename && *filename) {


          url =  (HTParentAnchor *) HTAnchor_findAddress(argv[1]);
          source = (HTParentAnchor *) HTAnchor_findAddress(filename);

          status =HTPutDocumentAnchor(source, (HTAnchor *) url,request);

and start with:
./put2 http://huey/test2 file:ftp.c

I get:

HTSimplify.. `http://huey/test2' into
............ `http://huey/test2'
Find Parent. 8050468 with hash 152 and address `http://huey/test2' created
HTSimplify.. `file:ftp.c' into
............ `file:ftp.c'
Find Parent. 8050568 with hash 392 and address `file:ftp.c' created
Link create. from anchor 8050568 to 8050468 with type NONE, method PUT
Net After... Add 8002900 with order 0 tmplate `<null>' code 1 context 804a248
ChunkStream. Chunk 8047fc8 created with max size 0
HTAccess.... Accessing document file:ftp.c
Net Before.. calling 8026a6c (request 8046540, context 0)
Check rules. for `file:ftp.c'
Net Before.. calling 80269c4 (request 8046540, context 0)
Net Object.. 804d3d8 created with hash 0
Net Object.. starting request 8046540 (retry=1) with net object 804d3d8
HTLoadFile.. Looking for `file:ftp.c'
Node........ `file:ftp.c' means path `ftp.c'
Event....... Created event 8048028 with context 8050668, priority 20, and timeout -1
Event....... Created event 8048048 with context 8050668, priority 20, and timeout -1
Event....... Created event 8048068 with context 8050668, priority 20, and timeout -1
Host info... added `localhost' with host 8050668 to list 80491b0
Host info... Add Net 804d3d8 (request 8046540) to pipe, 1 requests made, 1 requests in pipe, 0 pending
HTHost...... No ActivateRequest callback handler registered
Load File... Found `ftp.c'
File mode is 0100644, uid=7144, gid=0. My uid=7144, 1 groups ( 21)
Channel..... Hash value is 3
Channel..... Added 804a288 to list 8049200
Reader...... Created reader stream 8052000
StreamStack. Constructing stream stack for www/unknown to */*
Response.... Created 804d4d8
Error....... Add   2    Severity: 8     Parameter: `Unspecified'        Where: `HTLoadFile'
HTLoadFile.. Returning

I have been able to get put to work with an event loop
(HTProfile_newNoCacheClient), but that is not compatable with the code
I've already written that uses the HTProfile_newPreemptiveClient
profile.   What am I not doing here, or am I missing something
about the event models.  


Tom M. Kroeger                           Pray for wind
Dascom Inc.                          \    Pray for waves
e-mail: tmk@dascom.com               |\    and Pray it's your day off!
Received on Friday, 10 July 1998 19:34:06 UTC

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