From cf7be2d601e549200aefd7b235080e3cf13ea57d Mon Sep 17 00:00:00 2001 From: mpc <mpc> Date: Sun, 1 Aug 2004 04:06:44 +0000 Subject: [PATCH] Fixed stupid bug when pinging multiple hosts --- apps/sam/c/examples/Makefile | 2 +- apps/sam/c/examples/i2p-ping/Makefile | 6 +++++- apps/sam/c/examples/i2p-ping/i2p-ping.c | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/sam/c/examples/Makefile b/apps/sam/c/examples/Makefile index a876e95394..f1546f2ecb 100644 --- a/apps/sam/c/examples/Makefile +++ b/apps/sam/c/examples/Makefile @@ -22,7 +22,7 @@ LIBS = -lsam all: warhammer-dgram -warhammer-dgram: +warhammer-dgram: warhammer-dgram.c $(CC) $(CFLAGS) -o warhammer-dgram.o -c warhammer-dgram.c $(CC) $(CFLAGS) -o warhammer-dgram warhammer-dgram.o $(LIBS) diff --git a/apps/sam/c/examples/i2p-ping/Makefile b/apps/sam/c/examples/i2p-ping/Makefile index 96f6a8cafb..ff4be71a96 100644 --- a/apps/sam/c/examples/i2p-ping/Makefile +++ b/apps/sam/c/examples/i2p-ping/Makefile @@ -7,6 +7,7 @@ # CC = gcc +INSTALL = install # # Flags @@ -22,10 +23,13 @@ LIBS = -lsam all: i2p-ping -i2p-ping: +i2p-ping: i2p-ping.c $(CC) $(CFLAGS) -o i2p-ping.o -c i2p-ping.c $(CC) $(CFLAGS) -o i2p-ping i2p-ping.o $(LIBS) +install: i2p-ping + $(INSTALL) i2p-ping $(HOME)/bin + # # Cleanup rules # diff --git a/apps/sam/c/examples/i2p-ping/i2p-ping.c b/apps/sam/c/examples/i2p-ping/i2p-ping.c index 079cbca009..1b60371d2d 100644 --- a/apps/sam/c/examples/i2p-ping/i2p-ping.c +++ b/apps/sam/c/examples/i2p-ping/i2p-ping.c @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) quiet = true; break; case 'v': /* version */ - puts("$Id: i2p-ping.c,v 1.1 2004/07/31 21:38:15 mpc Exp $"); + puts("$Id: i2p-ping.c,v 1.2 2004/07/31 22:20:22 mpc Exp $"); puts("Copyright (c) 2004, Matthew P. Cashdollar <mpc@innographx.com>"); break; case '?': @@ -132,6 +132,7 @@ int main(int argc, char* argv[]) while (!gotdest) /* just wait for the naming lookup to complete */ sam_read_buffer(session); + gotdest = false; for (int i = 0; i < count; ++i) { time_t start = time(0); -- GitLab