Cleaned test scripts to be (nearly?) atomic
[idzebra-moved-to-github.git] / perl / zebra_perl.c
index 3024d4b..8f42896 100644 (file)
@@ -20,12 +20,12 @@ NMEM handles;
 void init (void) {
   nmem_init ();
   yaz_log_init_prefix ("ZebraPerl");
-  yaz_log (LOG_LOG, "Zebra API initialized");
+  yaz_log (LOG_DEBUG, "Zebra API initialized");
 }
 
 void DESTROY (void) {
   nmem_exit ();
-  yaz_log (LOG_LOG, "Zebra API destroyed");
+  yaz_log (LOG_DEBUG, "Zebra API destroyed");
 }   
 
 /* Logging facilities from yaz */
@@ -64,7 +64,7 @@ void record_retrieve(RetrievalObj *ro,
     res->errString = "";
   }
   res->position   = ro->records[i].position;
-  res->base       = ro->records[i].base;
+  res->base       = odr_strdup(stream, ro->records[i].base);
   res->format     = (char *) 
     yaz_z3950_oid_value_to_str(ro->records[i].format, CLASS_RECSYN); 
   res->buf        = buf;