summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsc2002-02-08 18:16:54 +0000
committersc2002-02-08 18:16:54 +0000
commitaead79f4d034d3ec642cd23a3243bacd3882dcdc (patch)
tree6453f4a002163dbf0ae9963b3595c2e16ff4923d
parent963fde4487bf9f5fdf4baa63dec63427598b0f2e (diff)
downloadivyd-master.zip
ivyd-master.tar.gz
ivyd-master.tar.bz2
ivyd-master.tar.xz
Version 1.2 mainly fixes exit value for ivyechoHEADmaster
-rw-r--r--redhat/changelog6
-rw-r--r--src/Makefile7
-rw-r--r--src/inivyd.c17
-rw-r--r--src/ivyecho.c6
4 files changed, 19 insertions, 17 deletions
diff --git a/redhat/changelog b/redhat/changelog
index 4da5b8b..8802b46 100644
--- a/redhat/changelog
+++ b/redhat/changelog
@@ -1,4 +1,4 @@
-$Version = "1.1";
+$Version = "1.2";
$Release = 1;
$ChangeLog = '
@@ -10,4 +10,8 @@ $ChangeLog = '
* Sun Nov 18 2001 Stéphane Chatty <chatty@cena.fr>
- Generation of version 1.1-1
+ * Fri Feb 1 2002 Stéphane Chatty <chatty@cena.fr>
+- Generation of version 1.2-1
+- Fixed return values
+
';
diff --git a/src/Makefile b/src/Makefile
index b535bfd..753b2a5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,7 @@
#
# IvyDaemon, an Ivy gateway for short-lived agents
#
-# Copyright (C) 1999-2001
+# Copyright (C) 1999-2002
# Centre d'Études de la Navigation Aérienne
#
# Makefile
@@ -57,8 +57,3 @@ install: all
test -d $(MAN)/man8 || mkdirhier $(MAN)/man8
install -m 644 ../doc/in.ivyd.8 $(MAN)/man8
-
-rpm::
- /usr/bin/rpmize
-
-
diff --git a/src/inivyd.c b/src/inivyd.c
index f73c693..e08b335 100644
--- a/src/inivyd.c
+++ b/src/inivyd.c
@@ -1,7 +1,7 @@
/*
* IvyDaemon, an Ivy gateway for short-lived agents
*
- * Copyright (C) 1999-2001
+ * Copyright (C) 1999-2002
* Centre d'Études de la Navigation Aérienne
*
* Main file for the super-daemon
@@ -19,13 +19,13 @@
/*
* The super-demon (in.ivyd):
*
- * It is either launched by inetd with the socket SOCK_DGRAM on file descriptor 0,
- * or at boot time with the -boot flag.
+ * It is either launched by inetd with the socket SOCK_DGRAM on file
+ * descriptor 0, or at boot time with the -boot flag.
*
* The daemon (ivyd):
*
- * It sends the super-daemon a message connmsg of type MSG_SERVER that contains
- * the port number of the socket it connected to.
+ * It sends the super-daemon a message connmsg of type MSG_SERVER that
+ * contains the port number of the socket it connected to.
*
* The clients (ivyecho, ...):
*
@@ -33,6 +33,7 @@
* to ask for the port number
*
* L'identification de l'emetteur du paquet est le numero d'utilisateur.
+ *
*/
#include <stdlib.h>
@@ -93,6 +94,7 @@ GetInfo (int key)
* DumpInfo ()
*
* Dumps to a file the contents of the table
+ *
*/
int
@@ -108,7 +110,8 @@ DumpInfo ()
for (si = si_table; si - si_table < TABSIZ; ++si) {
if (! si->s_port)
continue;
- (void) sprintf (buf, "user %5d, port %d\n", si->s_key, ntohs (si->s_port));
+ (void) sprintf (buf, "user %5d, port %d\n",
+ si->s_key, ntohs (si->s_port));
(void) write (fd, buf, strlen (buf));
}
(void) close (fd);
@@ -142,7 +145,7 @@ main (int argc, const char **argv)
char *pp = getenv (port_env_variable);
serv_port = htons (pp ? atoi (pp) : default_port);
if (serv_port <= 0)
- exit (0);
+ exit (1);
} else
serv_port = serv -> s_port;
diff --git a/src/ivyecho.c b/src/ivyecho.c
index 15de8e6..85e9051 100644
--- a/src/ivyecho.c
+++ b/src/ivyecho.c
@@ -1,7 +1,7 @@
/*
* IvyDaemon, an Ivy gateway for short-lived agents
*
- * Copyright (C) 1999-2001
+ * Copyright (C) 1999-2002
* Centre d'Études de la Navigation Aérienne
*
* Main file for the client ivyecho
@@ -313,7 +313,7 @@ main (int argc, char** argv)
busport = ExtractPort (bus);
- /* Se connecter au serveur. */
+ /* connection to server */
servfd = ServerOpen (serverhost, busport);
if (!servfd) {
fprintf (stderr, "No server.\n");
@@ -322,6 +322,6 @@ main (int argc, char** argv)
HandleArgs (servfd, optind, argc, argv);
- return 1;
+ return 0;
}