Commit 2494d81f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Use isc 0.97.

parent 6ba301c9
#
# $Id: Makefile,v 0.24 1992/04/14 15:43:23 ceder Exp $
# $Id: Makefile,v 0.25 1992/04/15 22:59:15 ceder Exp $
# Copyright (C) 1991 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -22,7 +22,7 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# $Id: Makefile,v 0.24 1992/04/14 15:43:23 ceder Exp $
# $Id: Makefile,v 0.25 1992/04/15 22:59:15 ceder Exp $
include Topdir.make
SCRIPTDIR = $(TOPDIR)/scripts
......@@ -39,7 +39,7 @@ HDRS = admin.h isc-parse.h prot-a-output.h async.h isc-interface.h \
# See config/sun4os4-defs.make about LIBRESOLV if you are running SunOS 4.1.1.
LIBS = -lold-isc$(PROFILE-LIB-SUFFIX) -lmisc$(PROFILE-LIB-SUFFIX) \
LIBS = -lisc-new$(PROFILE-LIB-SUFFIX) -lmisc$(PROFILE-LIB-SUFFIX) \
-llyskom-server$(PROFILE-LIB-SUFFIX) -lansi$(PROFILE-LIB-SUFFIX) \
$(LIBRESOLV) $(LIBIDENT)
......@@ -66,13 +66,13 @@ GENOBJS = connections.o log.o $(ATOMS) \
kom-types.o \
send-async.o server-config.o text-garb.o \
missing-ansi.o isc-parse.o memory.o $(PROTA) $(MUX) \
internal-connections.o rfc931.o
internal-connections.o rfc931.o isc-malloc.o
GEN_SRCS = connections.c log.c $(ATOMS_SRCS) \
kom-types.c \
send-async.c server-config.c text-garb.c \
missing-ansi.c isc-parse.c memory.c $(PROTA_SRCS) $(MUX_SRCS) \
internal-connections.c rfc931.o
internal-connections.c rfc931.c isc-malloc.c
# Files for lyskomd.
......
/*
* $Id: isc-interface.h,v 0.3 1991/09/15 10:31:44 linus Exp $
* $Id: isc-interface.h,v 0.4 1992/04/15 22:59:18 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,10 +23,10 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: isc-interface.h,v 0.3 1991/09/15 10:31:44 linus Exp $
* $Id: isc-interface.h,v 0.4 1992/04/15 22:59:18 ceder Exp $
*
* Wrapper around <isc.h> to ensure that ISC_UDGTYPE is always correct.
*/
#define ISC_UDGTYPE struct mux
#include <isc.h>
#include <isc-new.h>
/*
* $Id: lyskomd.h,v 0.3 1991/09/15 10:31:25 linus Exp $
* $Id: lyskomd.h,v 0.4 1992/04/15 22:59:20 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,13 +23,16 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: lyskomd.h,v 0.3 1991/09/15 10:31:25 linus Exp $
*
** Defined in ramkomd.c /pen
*/
extern int listen_client;
extern int listen_mux;
* $Id: lyskomd.h,v 0.4 1992/04/15 22:59:20 ceder Exp $
*/
/* Defined in ramkomd.c */
extern struct isc_scb *listen_client;
extern struct isc_scb *listen_mux;
/* Defined in connections.c */
extern struct isc_mcb * kom_server_mcb;
/*
* restart_kom is used to try to recover from an impossible error.
......
/*
* $Id: mux.c,v 0.7 1991/09/21 13:06:58 ceder Exp $
* $Id: mux.c,v 0.8 1992/04/15 22:59:22 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -26,7 +26,7 @@
** mux.c
*/
static char *rcsid = "$Id: mux.c,v 0.7 1991/09/21 13:06:58 ceder Exp $";
static char *rcsid = "$Id: mux.c,v 0.8 1992/04/15 22:59:22 ceder Exp $";
#include <stddef.h>
......@@ -50,7 +50,7 @@ extern _printf( int (*sputc)(int chr), const char *fmt, va_list AP);
*/
Mux *
mux_create(Mux_type type, ISCSCB *scb)
mux_create(Mux_type type, IscSession *scb)
{
Mux *mp;
......@@ -409,7 +409,7 @@ mux_close(Connection * cp)
switch (mp->type)
{
case MUX_TYPE_CLIENT:
isc_close(mp->scb);
isc_destroy(kom_server_mcb, mp->scb);
if (mp->client_c != 1)
restart_kom("ERROR: mux_close(): client_c == %d\n", mp->client_c);
......
/*
* $Id: ramkomd.c,v 0.27 1992/04/04 17:32:15 ceder Exp $
* $Id: ramkomd.c,v 0.28 1992/04/15 22:59:23 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -31,7 +31,7 @@
* It has grown! /ceder
*/
static char *rcsid = "$Id: ramkomd.c,v 0.27 1992/04/04 17:32:15 ceder Exp $";
static char *rcsid = "$Id: ramkomd.c,v 0.28 1992/04/15 22:59:23 ceder Exp $";
#include <m-config.h>
......@@ -58,11 +58,11 @@ static char *rcsid = "$Id: ramkomd.c,v 0.27 1992/04/04 17:32:15 ceder Exp $";
#include "s-string.h"
#include <kom-types.h>
#include "string-malloc.h"
#include "isc-malloc.h"
#include <kom-errno.h>
#include "internal-services.h"
#include "lyskomd.h"
#include "isc-interface.h"
#include <isc-dump.h>
#include <server/smalloc.h>
#include "cache.h"
#include "log.h"
......@@ -95,8 +95,8 @@ INTERNAL char memusefile[BUFSIZ]; /* Memory usage file. */
static char ip_client_port[80]; /* Port to listen to for clients */
static char ip_mux_port[80]; /* Port to listen to for mux:es */
int listen_client = -1; /* ISC listen identifier */
int listen_mux = -1; /* -"- */
IscSession *listen_client = NULL; /* ISC listen identifier */
IscSession *listen_mux = NULL; /* -"- */
static char *dbase_dir = NULL; /* Directory where database resides */
......@@ -107,23 +107,35 @@ dump_exit_statistics(void);
static void
server_init( char * client_port, char * mux_port)
{
IscConfig config;
/*
** Setup some parameters here
*/
isc_setlogfn(&logv);
isc_setallocfn(&smalloc, &srealloc, &sfree);
/* isc_setabortfn(&restart_kom); */
config.version = 1005;
config.master.version = 1001;
config.master.memfn.alloc = &isc_malloc_wrapper;
config.master.memfn.realloc = &isc_realloc_wrapper;
config.master.memfn.free = &isc_free_wrapper;
config.master.abortfn = NULL; /* FIXME+++ */
config.session.version = 1001;
config.session.max.msgsize = -1;
config.session.max.queuedsize = -1;
config.session.max.dequeuelen = -1;
config.session.max.openretries = -1;
config.session.max.backlog = -1;
kom_server_mcb = isc_initialize(NULL);
if ( kom_server_mcb == NULL )
restart_kom("server_init: can't isc_setup()\n");
if ((listen_client = isc_listentcp(kom_server_mcb, client_port)) < 0)
restart_kom("server_init: can't isc_listen(CLIENT)\n");
restart_kom("server_init: can't isc_initialize()\n");
listen_client = isc_listentcp(kom_server_mcb, NULL, client_port);
if (listen_client == NULL)
restart_kom("server_init: can't isc_listentcp(CLIENT)\n");
if ((listen_mux = isc_listentcp(kom_server_mcb, mux_port)) < 0)
restart_kom("server_init: can't isc_listen(MUX)\n");
listen_mux = isc_listentcp(kom_server_mcb, NULL, mux_port);
if (listen_mux == NULL)
restart_kom("server_init: can't isc_listentcp(MUX)\n");
/*
......@@ -354,7 +366,6 @@ dump_exit_statistics(void)
dump_cache_mem_usage(stat_file);
dump_string_alloc_counts(stat_file);
dump_allocated_connections(stat_file);
dump_isc_message_counts(stat_file);
dump_isc_alloc_counts(stat_file);
fclose (stat_file);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment