dgaudet 98/03/29 01:33:25
Modified: src/main rfc1413.c Log: a little more efficient Revision Changes Path 1.21 +3 -2 apache-1.3/src/main/rfc1413.c Index: rfc1413.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/rfc1413.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- rfc1413.c 1998/03/17 08:21:03 1.20 +++ rfc1413.c 1998/03/29 09:33:24 1.21 @@ -106,6 +106,7 @@ int i; char *cp; char buffer[RFC1413_MAXDATA + 1]; + int buflen; /* * Bind the local and remote ends of the query socket to the same @@ -137,10 +138,10 @@ return -1; /* send the data */ - ap_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", ntohs(rmt_sin->sin_port), + buflen = ap_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", ntohs(rmt_sin->sin_port), ntohs(our_sin->sin_port)); do - i = write(sock, buffer, strlen(buffer)); + i = write(sock, buffer, buflen); while (i == -1 && errno == EINTR); if (i == -1) { aplog_error(APLOG_MARK, APLOG_CRIT, srv,