Use pthread_atfork to lock/unlock yaz_log system
[yaz-moved-to-github.git] / util / yaz-illclient.c
index a8bd956..5693366 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 
@@ -364,9 +364,9 @@ ILL_Extension *makepromptextension(struct prog_args *args, ODR odr) {
     buf= odr_getbuf(odr_ext,&siz,0);
     ext->u.single_ASN1_type=(Odr_any *)
         odr_malloc(odr,sizeof(*ext->u.single_ASN1_type));
-    ext->u.single_ASN1_type->buf= (unsigned char *) odr_malloc(odr, siz);
+    ext->u.single_ASN1_type->buf= (char *) odr_malloc(odr, siz);
     memcpy(ext->u.single_ASN1_type->buf,buf, siz );
-    ext->u.single_ASN1_type->len = ext->u.single_ASN1_type->size = siz;
+    ext->u.single_ASN1_type->len = siz;
     odr_reset(odr_ext);
     odr_reset(odr_prt); /*!*/
 
@@ -380,9 +380,9 @@ ILL_Extension *makepromptextension(struct prog_args *args, ODR odr) {
     printf("External: \n");
     z_External(odr_prt, &ext,0,0);  /*!*/
     buf= odr_getbuf(odr_ext,&siz,0);
-    e->item->buf= (unsigned char *) odr_malloc(odr, siz);
+    e->item->buf= (char *) odr_malloc(odr, siz);
     memcpy(e->item->buf,buf, siz );
-    e->item->len = e->item->size = siz;
+    e->item->len = siz;
 
     odr_destroy(odr_prt);
     odr_destroy(odr_ext);
@@ -423,9 +423,9 @@ ILL_Extension *makeoclcextension(struct prog_args *args, ODR odr) {
     buf= odr_getbuf(odr_ext,&siz,0);
     ext->u.single_ASN1_type = (Odr_any*)
         odr_malloc(odr,sizeof(*ext->u.single_ASN1_type));
-    ext->u.single_ASN1_type->buf = (unsigned char *) odr_malloc(odr, siz);
+    ext->u.single_ASN1_type->buf = (char *) odr_malloc(odr, siz);
     memcpy(ext->u.single_ASN1_type->buf,buf, siz );
-    ext->u.single_ASN1_type->len = ext->u.single_ASN1_type->size = siz;
+    ext->u.single_ASN1_type->len = siz;
     odr_reset(odr_ext);
     odr_reset(odr_prt); /*!*/
 
@@ -439,9 +439,9 @@ ILL_Extension *makeoclcextension(struct prog_args *args, ODR odr) {
     printf("External: \n");
     z_External(odr_prt, &ext,0,0);  /*!*/
     buf= odr_getbuf(odr_ext,&siz,0);
-    e->item->buf= (unsigned char *) odr_malloc(odr, siz);
+    e->item->buf= (char *) odr_malloc(odr, siz);
     memcpy(e->item->buf, buf, siz);
-    e->item->len = e->item->size = siz;
+    e->item->len = siz;
 
     odr_destroy(odr_prt);
     odr_destroy(odr_ext);