From: wessels <> Date: Fri, 6 Feb 1998 03:33:58 +0000 (+0000) Subject: renamed ->free to ->free_func to avoid conflicts X-Git-Tag: SQUID_3_0_PRE1~4164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0dec0813a8902700eb11b17d622e7d204bfdc16;p=thirdparty%2Fsquid.git renamed ->free to ->free_func to avoid conflicts use xstrncpy --- diff --git a/src/comm.cc b/src/comm.cc index 3d4c912704..1c74a48aab 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.224 1998/02/02 21:16:20 wessels Exp $ + * $Id: comm.cc,v 1.225 1998/02/05 20:33:58 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -167,8 +167,8 @@ CommWriteStateCallbackAndFree(int fd, int code) fd_table[fd].rwstate = NULL; if (CommWriteState == NULL) return; - if (CommWriteState->free) { - CommWriteState->free(CommWriteState->buf); + if (CommWriteState->free_func) { + CommWriteState->free_func(CommWriteState->buf); CommWriteState->buf = NULL; } callback = CommWriteState->handler; @@ -592,7 +592,7 @@ comm_accept(int fd, struct sockaddr_in *peer, struct sockaddr_in *me) /* fdstat update */ fd_open(sock, FD_SOCKET, "HTTP Request"); F = &fd_table[sock]; - strcpy(F->ipaddr, inet_ntoa(P.sin_addr)); + xstrncpy(F->ipaddr, inet_ntoa(P.sin_addr), 16); F->remote_port = htons(P.sin_port); F->local_port = htons(M.sin_port); commSetNonBlocking(sock); @@ -1431,7 +1431,7 @@ comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE state->offset = 0; state->handler = handler; state->handler_data = handler_data; - state->free = free_func; + state->free_func = free_func; fd_table[fd].rwstate = state; cbdataLock(handler_data); commSetSelect(fd,