Merge branch 'protocol-version2' of ssh://git.indexdata.com/home/git/pub/pazpar2...
authorDennis Schafroth <dennis@indexdata.com>
Fri, 20 Apr 2012 08:50:06 +0000 (10:50 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 20 Apr 2012 08:50:06 +0000 (10:50 +0200)
buildconf.sh
src/database.c
src/settings.c
test/test_limit_limitmap.urls
test/test_limit_limitmap_service.xml

index ac1f580..fdadda8 100755 (executable)
@@ -61,7 +61,7 @@ sh_flags=""
 conf_flags=""
 case $1 in
     -d)
-       sh_cflags="-g -Wall -Wdeclaration-after-statement -Wstrict-prototypes"
+       sh_cflags="-O0 -g -Wall -Wdeclaration-after-statement -Wstrict-prototypes"
        sh_cxxflags="-g -Wall"
        enable_configure=true
        enable_help=false
index d6fb757..21b442c 100644 (file)
@@ -68,7 +68,7 @@ struct database *new_database_inherit_settings(const char *id, NMEM nmem, struct
     db->next = 0;
 
     if (service_settings && service_settings->num_settings > 0) {
-        yaz_log(YLOG_LOG, "copying values from service settings");
+        yaz_log(YLOG_DEBUG, "copying settings from service to database %s settings", db->id);
         db->num_settings = service_settings->num_settings;
         db->settings = nmem_malloc(nmem, sizeof(struct settings*) * db->num_settings);
         // Initialize database settings with service settings
@@ -76,7 +76,7 @@ struct database *new_database_inherit_settings(const char *id, NMEM nmem, struct
 
     }
     else {
-        yaz_log(YLOG_LOG, "No service settings delivered");
+        yaz_log(YLOG_DEBUG, "No service settings to database %s ", db->id);
         db->num_settings = PZ_MAX_EOF;
         db->settings = nmem_malloc(nmem, sizeof(struct settings*) * db->num_settings);
         memset(db->settings, 0, sizeof(struct settings*) * db->num_settings);
@@ -101,7 +101,7 @@ struct database *create_database_for_service(const char *id,
         if (!strcmp(p->id, id))
             return p;
     
-    yaz_log(YLOG_LOG, "new database from service %s values %p", service->id, service->settings);
+    yaz_log(YLOG_DEBUG, "new database %s under service %s values %p", id, service->id);
     p = new_database_inherit_settings(id, service->nmem, service->settings);
 
     p->next = service->databases;
index ccf7b61..dcd941f 100644 (file)
@@ -145,7 +145,7 @@ int settings_lookup_offset(struct conf_service *service, const char *name)
     return settings_index_lookup(service->dictionary, name, 0);
 }
 
-static char *settings_name(struct conf_service *service, int offset)
+char *settings_name(struct conf_service *service, int offset)
 {
     assert(offset < service->dictionary->num);
     return service->dictionary->dict[offset];
@@ -368,7 +368,7 @@ void expand_settings_array2(struct settings *settings, int offset, NMEM nmem)
     }
 }
 
-void update_settings(struct setting *set, struct settings *settings, int offset, NMEM nmem)
+static void update_settings(struct setting *set, struct settings *settings, int offset, NMEM nmem)
 {
     struct setting **sp;
     yaz_log(YLOG_LOG, "update service settings offset %d with %s=%s", offset, set->name, set->value);
index 917eef1..eda63e7 100644 (file)
@@ -1,4 +1,4 @@
-test_limit_limitmap_service.xml http://localhost:9763/search.pz2?command=init
+test_limit_limitmap_service.xml http://localhost:9763/search.pz2?command=init&service=limitmap
 test_limit_limitmap_settings_1.xml http://localhost:9763/search.pz2?session=1&command=settings
 http://localhost:9763/search.pz2?session=1&command=search&query=computer
 4 http://localhost:9763/search.pz2?session=1&command=show&block=1
index 6b7fc3a..1f1ae45 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<service>
+<service id="limitmap">
 
   <settings target="*">
     <set name="pz:limitmap:author" value="ccl:au" />