Bug-fixes
authorSebastian Hammer <quinn@indexdata.com>
Tue, 14 Mar 1995 16:59:48 +0000 (16:59 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Tue, 14 Mar 1995 16:59:48 +0000 (16:59 +0000)
server/Makefile
server/eventl.c
server/statserv.c

index db3ca27..aa16cea 100644 (file)
@@ -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
index 980b0c2..1780a01 100644 (file)
@@ -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;
 }
index 89626f4..1ceae58 100644 (file)
@@ -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')':'<address>.\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();
 }