HttpControlMsg.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "comm/Flag.h"
11#include "CommCalls.h"
12#include "HttpControlMsg.h"
13
14void
16{
17 if (cbControlMsgSent) {
19 cbControlMsgSent = nullptr;
20 }
21}
22
24void
26{
27 if (params.flag == Comm::ERR_CLOSING)
28 return;
29
30 if (params.flag == Comm::OK) {
32 return;
33 }
34
35 debugs(33, 3, "1xx writing failed: " << xstrerr(params.xerrno));
36 // no error notification: see HttpControlMsg.h for rationale and
37 // note that some errors are detected elsewhere (e.g., close handler)
38
39 // close on 1xx errors to be conservative and to simplify the code
40 // (if we do not close, we must notify the source of a failure!)
41 params.conn->close();
42
43 // XXX: writeControlMsgAndCall() should handle writer-specific writing
44 // results, including errors and then call us with success/failure outcome.
45}
46
#define ScheduleCallHere(call)
Definition: AsyncCall.h:166
int xerrno
The last errno to occur. non-zero if flag is Comm::COMM_ERROR.
Definition: CommCalls.h:83
Comm::Flag flag
comm layer result status.
Definition: CommCalls.h:82
Comm::ConnectionPointer conn
Definition: CommCalls.h:80
AsyncCall::Pointer cbControlMsgSent
Call to schedule when the control msg has been sent.
void wroteControlMsg(const CommIoCbParams &)
callback to handle Comm::Write completion
virtual void doneWithControlMsg()
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194
@ OK
Definition: Flag.h:16
@ ERR_CLOSING
Definition: Flag.h:24
const char * xstrerr(int error)
Definition: xstrerror.cc:83

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors