Display error if only one host is specified (tt#17).
This commit is contained in:
parent
5c9c110a29
commit
845d1e16ba
28
omping-001-one-host-specified.patch
Normal file
28
omping-001-one-host-specified.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 3c29b7dc7133cf366ad154f3a70004465f4e406b Mon Sep 17 00:00:00 2001
|
||||
From: Jan Friesse <jfriesse@redhat.com>
|
||||
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
|
||||
|
||||
@ -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 <jfriesse@redhat.com> - 0.0.1-3
|
||||
- Display error if only one host is specified
|
||||
|
||||
* Wed Nov 24 2010 Jan Friesse <jfriesse@redhat.com> - 0.0.1-2
|
||||
- Change hard coded prefix path to macro
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user