From 845d1e16ba405ab923affb708b3fb9d486746294 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 30 Nov 2010 14:57:53 +0100 Subject: [PATCH] Display error if only one host is specified (tt#17). --- omping-001-one-host-specified.patch | 28 ++++++++++++++++++++++++++++ omping.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 omping-001-one-host-specified.patch diff --git a/omping-001-one-host-specified.patch b/omping-001-one-host-specified.patch new file mode 100644 index 0000000..e59dc46 --- /dev/null +++ b/omping-001-one-host-specified.patch @@ -0,0 +1,28 @@ +From 3c29b7dc7133cf366ad154f3a70004465f4e406b Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Tue, 30 Nov 2010 14:39:54 +0100 +Subject: [PATCH] Display error if only one host is specified + +Resolves: tt#17 +--- + cli.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cli.c b/cli.c +index 7d79ea3..a062922 100644 +--- a/cli.c ++++ b/cli.c +@@ -423,8 +423,8 @@ parse_remote_addrs(int argc, char * const argv[], const char *port, int ip_ver, + } + } + +- if (no_ai < 1) { +- warnx("at least one remote addresses should be specified"); ++ if (no_ai < 2) { ++ warnx("at least two addresses must be specified (local and remote)"); + usage(); + exit(1); + } +-- +1.7.3 + diff --git a/omping.spec b/omping.spec index 1d05dce..40baa7e 100644 --- a/omping.spec +++ b/omping.spec @@ -1,11 +1,12 @@ Name: omping Version: 0.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Utility to test IP multicast functionality Group: Applications/Internet License: ISC URL: http://fedorahosted.org/omping/ Source0: http://fedorahosted.org/releases/o/m/omping/%{name}-%{version}.tar.gz +Patch0: omping-001-one-host-specified.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description @@ -14,6 +15,7 @@ primarily in local network. %prep %setup -q +%patch0 -p1 %build make %{?_smp_mflags} CFLAGS="%{optflags}" @@ -32,6 +34,9 @@ rm -rf %{buildroot} %{_mandir}/man8/* %changelog +* Tue Nov 30 2010 Jan Friesse - 0.0.1-3 +- Display error if only one host is specified + * Wed Nov 24 2010 Jan Friesse - 0.0.1-2 - Change hard coded prefix path to macro