/* This file is part of Pazpar2.
- Copyright (C) 2006-2009 Index Data
+ Copyright (C) 2006-2010 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#endif
if (lf && len)
{
- fwrite(result, 1, len, lf);
+ (void) fwrite(result, 1, len, lf);
fprintf(lf, "\n");
}
xmlFree(result);
// Master list of connections we're handling events to
-static IOCHAN channel_list = 0; /* thread pr */
+static iochan_man_t pazpar2_chan_man = 0; /* thread pr */
+
+void pazpar2_chan_man_start(void)
+{
+ pazpar2_chan_man = iochan_man_create(0 /* use threads */);
+}
void pazpar2_add_channel(IOCHAN chan)
{
- chan->next = channel_list;
- channel_list = chan;
+ assert(pazpar2_chan_man);
+ iochan_add(pazpar2_chan_man, chan);
}
void pazpar2_event_loop()
{
- event_loop(&channel_list);
+ assert(pazpar2_chan_man);
+ iochan_man_events(pazpar2_chan_man);
}
static struct record_metadata *record_metadata_init(