From a4d2b1d22b135d53d88c96a452a62d3009197d29 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 14 Mar 1995 16:59:48 +0000 Subject: [PATCH 1/1] Bug-fixes --- server/Makefile | 4 ++-- server/eventl.c | 6 +++++- server/statserv.c | 14 +++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/server/Makefile b/server/Makefile index db3ca27..aa16cea 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,7 +1,7 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.3 1995-03-14 11:30:14 quinn Exp $ +# $Id: Makefile,v 1.4 1995-03-14 16:59:48 quinn Exp $ SHELL=/bin/sh INCLUDE=-I../include -I. -I../asn -I../odr -I../yazlib -I../../egate/include\ @@ -11,7 +11,7 @@ LIBINCLUDE=-L$(LIBDIR) #CFLAGS=-Wall -pedantic -g DEFS=$(INCLUDE) LIB=$(LIBDIR)/libserver.a -LIBS=-lserver -lasn -lodr -lcomstack ../../alex/lib/util.a +LIBS=$(LIBDIR)/libserver.a $(LIBDIR)/libasn.a $(LIBDIR)/libodr.a $(LIBDIR)/libcomstack.a ../../alex/lib/util.a PO = eventl.o CPP=cc -E PROG=statserv diff --git a/server/eventl.c b/server/eventl.c index 980b0c2..1780a01 100644 --- a/server/eventl.c +++ b/server/eventl.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: eventl.c,v $ - * Revision 1.3 1995-03-14 11:30:14 quinn + * Revision 1.4 1995-03-14 16:59:48 quinn + * Bug-fixes + * + * Revision 1.3 1995/03/14 11:30:14 quinn * Works better now. * * Revision 1.2 1995/03/14 10:27:59 quinn @@ -36,6 +39,7 @@ IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags) new->flags = flags; new->fun = cb; new->next = iochans; + new->force_event = 0; iochans = new; return new; } diff --git a/server/statserv.c b/server/statserv.c index 89626f4..1ceae58 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: statserv.c,v $ - * Revision 1.3 1995-03-14 11:30:15 quinn + * Revision 1.4 1995-03-14 16:59:48 quinn + * Bug-fixes + * + * Revision 1.3 1995/03/14 11:30:15 quinn * Works better now. * * Revision 1.2 1995/03/14 10:28:03 quinn @@ -32,6 +35,8 @@ static char *me = ""; +#define DEFAULT_LISTENER "tcp:localhost:9999" + /* * handle incoming connect requests. */ @@ -93,6 +98,7 @@ void add_listener(char *where) void *ap; IOCHAN lst; + fprintf(stderr, "Adding listener on %s\n", where); if (!where || sscanf(where, "%[^:]:%s", mode, addr) != 2) { fprintf(stderr, "%s: Address format: ('tcp'|'osi')':'
.\n", @@ -148,6 +154,7 @@ int main(int argc, char **argv) int ret, listeners = 0; char *arg; + me = argv[0]; while ((ret = options("l:", argv, argc, &arg)) != -2) switch (ret) { @@ -158,9 +165,6 @@ int main(int argc, char **argv) exit(1); } if (!listeners) - { - fprintf(stderr, "%s: Must specify at least one listener.\n", me); - exit(1); - } + add_listener(DEFAULT_LISTENER); return event_loop(); } -- 1.7.10.4