From 1a9900671dd0b7b5647652987b244e2ba3c75b0f Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Sun, 25 Jun 2000 14:05:33 +0000 Subject: [PATCH] ICP compilation support is now OK --- SRC/echoping.c | 8 +++++--- SRC/icp.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SRC/echoping.c b/SRC/echoping.c index 84e7f86..4815452 100644 --- a/SRC/echoping.c +++ b/SRC/echoping.c @@ -5,6 +5,8 @@ * from Richard Stevens' book "Unix network programming" and Pierre Beyssac's * "bing" tool. * + * $Id$ + * */ char *progname; @@ -335,14 +337,13 @@ main (argc, argv) err_quit ("tcp_open: unknown service: %s/tcp", port_name); } } - else if (!icp) + else { if ((sp = getservbyname (port_name, "udp")) == NULL) { err_quit ("tcp_open: unknown service: %s/udp", port_name); } } - /* Else ICP... */ } /* * Fill in the structure "serv_addr" with the address of the server @@ -519,7 +520,7 @@ main (argc, argv) if (!udp) { /* Write something to the server */ - if (writen (sockfd, sendline, n) != n) + if (writen (sockfd, sendline, n) != n) { if ((nr < 0 || nr != n) && timeout_flag) { nr = n; @@ -528,6 +529,7 @@ main (argc, argv) } else err_sys ("writen error on socket"); + } } else { diff --git a/SRC/icp.c b/SRC/icp.c index 1a619a9..0c45f85 100644 --- a/SRC/icp.c +++ b/SRC/icp.c @@ -1,10 +1,10 @@ +#include "echoping.h" + #ifdef ICP /* Code contributed by Christian Grimm and patched by Stephane Bortzmeyer. */ -#include "echoping.h" - void * make_icp_sendline (url, shost, opcode, length)