From: adrian <> Date: Thu, 12 Sep 2002 15:43:51 +0000 (+0000) Subject: Document the semantics of comm_write() - its not immediately obvious X-Git-Tag: SQUID_3_0_PRE1~761 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cd8c4142b83b3c4fe823421ba73b20df2a00516;p=thirdparty%2Fsquid.git Document the semantics of comm_write() - its not immediately obvious (well, without reading the rest of comm.c) that the handler is called with COMM_ERROR_CLOSING whenever a comm filedescriptor is being closed during a write. --- diff --git a/src/comm.cc b/src/comm.cc index 74337c1e55..72175de363 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.331 2002/04/19 06:26:26 hno Exp $ + * $Id: comm.cc,v 1.332 2002/09/12 09:43:51 adrian Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -908,8 +908,12 @@ commHandleWrite(int fd, void *data) -/* Select for Writing on FD, until SIZE bytes are sent. Call - * *HANDLER when complete. */ +/* + * Queue a write. handler/handler_data are called when the write + * completes, on error, or on file descriptor close. + * + * free_func is used to free the passed buffer when the write has completed. + */ void comm_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) {