X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Fpazpar2.c;h=31cf43157f6c0e8fc04e35156039c6ad44a36eab;hb=235995289021a11b33312c91a55ccfbca605348b;hp=776b78c5f12fc274a237be14199682ace7fb5a37;hpb=bcbb4bd74d931e5f5419f5a577adb85bede15e4e;p=pazpar2-moved-to-github.git diff --git a/src/pazpar2.c b/src/pazpar2.c index 776b78c..31cf431 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.54 2007-03-27 11:25:57 marc Exp $ */ +/* $Id: pazpar2.c,v 1.56 2007-03-28 12:05:18 marc Exp $ */ #include #include @@ -40,6 +40,7 @@ #include "relevance.h" #include "config.h" #include "database.h" +#include "settings.h" #define MAX_CHUNK 15 @@ -74,6 +75,7 @@ struct parameters global_parameters = "", "", "", + "", 0, 0, 30, @@ -1018,7 +1020,7 @@ static struct connection *connection_create(struct client *cl) cl->connection = new; new->link = link; - new->iochan = iochan_create(cs_fileno(link), handler, 0); + new->iochan = iochan_create(cs_fileno(link), 0, handler, 0); iochan_setdata(new->iochan, new); new->iochan->next = channel_list; channel_list = new->iochan; @@ -1659,7 +1661,7 @@ int main(int argc, char **argv) yaz_log_init(YLOG_DEFAULT_LEVEL, "pazpar2", 0); - while ((ret = options("f:x:h:p:z:C:s:d", argv, argc, &arg)) != -2) + while ((ret = options("t:f:x:h:p:z:C:s:d", argv, argc, &arg)) != -2) { switch (ret) { case 'f': @@ -1678,6 +1680,9 @@ int main(int argc, char **argv) case 'z': strcpy(global_parameters.zproxy_override, arg); break; + case 't': + strcpy(global_parameters.settings_path, arg); + break; case 's': load_simpletargets(arg); break; @@ -1708,6 +1713,8 @@ int main(int argc, char **argv) start_proxy(); start_zproxy(); + if (*global_parameters.settings_path) + settings_read(global_parameters.settings_path); if (!global_parameters.ccl_filter) global_parameters.ccl_filter = load_cclfile("../etc/default.bib"); global_parameters.yaz_marc = yaz_marc_create();