--------------------- PatchSet 5269 Date: 2002/10/07 06:33:14 Author: rbcollins Branch: rbcollins_cxxtest Tag: (none) Log: async lookup in urn Members: src/urn.cc:1.1.2.2->1.1.2.3 Index: squid/src/urn.cc =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/urn.cc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid/src/urn.cc 7 Oct 2002 03:29:31 -0000 1.1.2.2 +++ squid/src/urn.cc 7 Oct 2002 06:33:14 -0000 1.1.2.3 @@ -1,6 +1,6 @@ /* - * $Id: urn.cc,v 1.1.2.2 2002/10/07 03:29:31 rbcollins Exp $ + * $Id: urn.cc,v 1.1.2.3 2002/10/07 06:33:14 rbcollins Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -99,11 +99,6 @@ cbdataFree ((UrnState *)address); } -void -UrnState::created (_StoreEntry *newEntry) -{ -} - UrnState::~UrnState () { safe_free(urlres); @@ -209,7 +204,6 @@ void UrnState::start(request_t * r, StoreEntry * e) { - StoreIOBuffer tempBuffer = EMPTYIOBUFFER; debug(52, 3) ("urnStart: '%s'\n", storeUrl(e)); entry = e; request = requestLink(r); @@ -217,8 +211,14 @@ setUriResFromRequest(r); if (urlres_r == NULL) return; + _StoreEntry::getPublic (this, urlres, METHOD_GET); +} - if ((urlres_e = storeGetPublic(urlres, METHOD_GET)) == NULL) { +void +UrnState::created(_StoreEntry *newEntry) +{ + urlres_e = newEntry; + if (urlres_e->isNull()) { urlres_e = storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET); sc = storeClientListAdd(urlres_e, this); fwdStart(-1, urlres_e, urlres_r); @@ -227,6 +227,7 @@ sc = storeClientListAdd(urlres_e, this); } reqofs = 0; + StoreIOBuffer tempBuffer = EMPTYIOBUFFER; tempBuffer.offset = reqofs; tempBuffer.length = URN_REQBUF_SZ; tempBuffer.data = reqbuf;