X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Flogic.c;h=c8ad513915a1257645f528e3dcee906ef56990b4;hb=9f15a2646ae6c666ac16c2d779afc3ee205df069;hp=c581f2d9f1b43591de8881313db286ba8b64abab;hpb=ca413b5d235e57bd9645cfab6958e4f059eeb509;p=pazpar2-moved-to-github.git diff --git a/src/logic.c b/src/logic.c index c581f2d..c8ad513 100644 --- a/src/logic.c +++ b/src/logic.c @@ -1,4 +1,4 @@ -/* $Id: logic.c,v 1.9 2007-04-18 19:45:09 quinn Exp $ +/* $Id: logic.c,v 1.10 2007-04-19 16:07:20 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -74,8 +74,6 @@ static int client_prep_connection(struct client *cl); static void ingest_records(struct client *cl, Z_Records *r); void session_alert_watch(struct session *s, int what); -IOCHAN channel_list = 0; // Master list of connections we're handling events to - static struct connection *connection_freelist = 0; static struct client *client_freelist = 0; @@ -1192,8 +1190,7 @@ static struct connection *connection_create(struct client *cl) new->iochan = iochan_create(cs_fileno(link), handler, 0); iochan_setdata(new->iochan, new); - new->iochan->next = channel_list; - channel_list = new->iochan; + pazpar2_add_channel(new->iochan); return new; } @@ -1755,7 +1752,18 @@ void start_zproxy(void) return; } +// Master list of connections we're handling events to +static IOCHAN channel_list = 0; +void pazpar2_add_channel(IOCHAN chan) +{ + chan->next = channel_list; + channel_list = chan; +} +void pazpar2_event_loop() +{ + event_loop(&channel_list); +} /* * Local variables: