projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
getting the paraz2 server host and port info from the HTTP request, and mirroring...
[pazpar2-moved-to-github.git]
/
src
/
pazpar2.c
diff --git
a/src/pazpar2.c
b/src/pazpar2.c
index
776b78c
..
31cf431
100644
(file)
--- 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 <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
@@
-40,6
+40,7
@@
#include "relevance.h"
#include "config.h"
#include "database.h"
#include "relevance.h"
#include "config.h"
#include "database.h"
+#include "settings.h"
#define MAX_CHUNK 15
#define MAX_CHUNK 15
@@
-74,6
+75,7
@@
struct parameters global_parameters =
"",
"",
"",
"",
"",
"",
+ "",
0,
0,
30,
0,
0,
30,
@@
-1018,7
+1020,7
@@
static struct connection *connection_create(struct client *cl)
cl->connection = new;
new->link = link;
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;
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);
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':
{
switch (ret) {
case 'f':
@@
-1678,6
+1680,9
@@
int main(int argc, char **argv)
case 'z':
strcpy(global_parameters.zproxy_override, arg);
break;
case 'z':
strcpy(global_parameters.zproxy_override, arg);
break;
+ case 't':
+ strcpy(global_parameters.settings_path, arg);
+ break;
case 's':
load_simpletargets(arg);
break;
case 's':
load_simpletargets(arg);
break;
@@
-1708,6
+1713,8
@@
int main(int argc, char **argv)
start_proxy();
start_zproxy();
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();
if (!global_parameters.ccl_filter)
global_parameters.ccl_filter = load_cclfile("../etc/default.bib");
global_parameters.yaz_marc = yaz_marc_create();