diff options
author | sc | 2002-02-08 18:16:54 +0000 |
---|---|---|
committer | sc | 2002-02-08 18:16:54 +0000 |
commit | aead79f4d034d3ec642cd23a3243bacd3882dcdc (patch) | |
tree | 6453f4a002163dbf0ae9963b3595c2e16ff4923d /src/inivyd.c | |
parent | 963fde4487bf9f5fdf4baa63dec63427598b0f2e (diff) | |
download | ivyd-master.zip ivyd-master.tar.gz ivyd-master.tar.bz2 ivyd-master.tar.xz |
Diffstat (limited to 'src/inivyd.c')
-rw-r--r-- | src/inivyd.c | 17 |
1 files changed, 10 insertions, 7 deletions
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; |