=================================================================== RCS file: /afs/w3.org/CVS-Repository/WWW/Library/src/HTHost.c,v retrieving revision 2.41 diff -c -r2.41 HTHost.c *** HTHost.c 1998/03/05 21:56:16 2.41 --- HTHost.c 1998/03/20 00:28:33 *************** *** 882,887 **** --- 882,888 ---- if (host && net) { int status = HT_OK; BOOL doit = (host->doit==net); + BOOL connector = (!host->lock || (host->lock && host->lock==net)); /* ** If we don't have a socket already then check to see if we can get *************** *** 898,904 **** /* ** Add net object to either active or pending queue. */ ! if (_roomInPipe(host) && (HTList_isEmpty(host->pending) || doit)) { if (doit) host->doit = NULL; if (!host->pipeline) host->pipeline = HTList_new(); HTList_addObject(host->pipeline, net); --- 899,905 ---- /* ** Add net object to either active or pending queue. */ ! if (_roomInPipe(host) && (HTList_isEmpty(host->pending) || doit) && connector) { if (doit) host->doit = NULL; if (!host->pipeline) host->pipeline = HTList_new(); HTList_addObject(host->pipeline, net); *************** *** 1152,1162 **** */ PUBLIC int HTHost_connect (HTHost * host, HTNet * net, char * url, HTProtocolId port) { int status; ! status = HTDoConnect(net, url, port); ! if (status == HT_OK) return HT_OK; ! if (status == HT_WOULD_BLOCK || status == HT_PENDING) ! return HT_WOULD_BLOCK; return HT_ERROR; /* @@@ - some more deletion and stuff here? */ } --- 1153,1187 ---- */ PUBLIC int HTHost_connect (HTHost * host, HTNet * net, char * url, HTProtocolId port) { + HTRequest * request = HTNet_request(net); int status; ! if (!host) { ! HTProtocol * protocol = HTNet_protocol(net); ! if ((host = HTHost_newWParse(request, url, HTProtocol_id(protocol))) == NULL) ! return NO; ! if (!host->channel) { ! host->forceWriteFlush = YES; ! host->lock = net; ! } ! HTNet_setHost(net, host); ! } ! ! if (!host->lock || (host->lock && host->lock == net)) { ! status = HTDoConnect(net, url, port); ! if (status == HT_OK) { ! host->lock = NULL; ! return HT_OK; ! } ! if (status == HT_WOULD_BLOCK) { ! host->lock = net; ! return HT_WOULD_BLOCK; ! } ! if (status == HT_PENDING) return HT_WOULD_BLOCK; ! } else { ! if ((status = HTHost_addNet(host, net)) == HT_PENDING) { ! return HT_PENDING; ! } ! } return HT_ERROR; /* @@@ - some more deletion and stuff here? */ } *************** *** 1478,1484 **** HTRequest *request; if (!ActivateReqCBF) { ! if (CORE_TRACE) HTTrace("HTHost....... No ActivateRequest " "callback handler registered\n"); return -1; } --- 1503,1509 ---- HTRequest *request; if (!ActivateReqCBF) { ! if (CORE_TRACE) HTTrace("HTHost...... No ActivateRequest " "callback handler registered\n"); return -1; } Index: Library/src/HTHstMan.html =================================================================== RCS file: /afs/w3.org/CVS-Repository/WWW/Library/src/HTHstMan.html,v retrieving revision 2.12 diff -c -r2.12 HTHstMan.html *** HTHstMan.html 1998/02/05 21:25:03 2.12 --- HTHstMan.html 1998/03/19 23:02:03 *************** *** 71,76 **** --- 71,77 ---- HTList * pipeline; /* Pipe line of net objects */ HTList * pending; /* List of pending Net objects */ HTNet * doit; /* Transfer from pending to pipe */ + HTNet * lock; /* This is a kludge! */ BOOL persistent; HTTransportMode mode; /* Supported mode */ HTTimer * timer; /* Timer for handling idle connection */ Index: Library/src/HTTCP.c =================================================================== RCS file: /afs/w3.org/CVS-Repository/WWW/Library/src/HTTCP.c,v retrieving revision 2.106 diff -c -r2.106 HTTCP.c *** HTTCP.c 1998/02/07 23:59:25 2.106 --- HTTCP.c 1998/03/19 22:51:37 *************** *** 186,202 **** char * hostname = HTHost_name(me); /* Jump into the state machine */ - if (!me) { - char * proxy = HTRequest_proxy(request); - HTProtocol * protocol = HTNet_protocol(net); - - /* Check to see whether we connect directly or via a proxy */ - if ((me = HTHost_newWParse(request, proxy ? proxy : url, - HTProtocol_id(protocol))) == NULL) - return NO; - - net->host = me; - } while (1) { switch (me->tcpstate) { case TCP_BEGIN: --- 186,191 ----