while (i < 20 && charset_p[i] &&
!strchr("; \n\r", charset_p[i]))
i++;
- *charset = (char*) odr_malloc(o, i+1);
- memcpy(*charset, charset_p, i);
- (*charset)[i] = '\0';
+ *charset = odr_strdupn(o, charset_p, i);
}
}
}
Z_SRW_extra_arg **ea = &sr->extra_args;
yaz_uri_to_array(extra_args, odr, &name, &val);
+ /** append rather than override */
+ while (*ea)
+ ea = &(*ea)->next;
while (*name)
{
*ea = (Z_SRW_extra_arg *) odr_malloc(odr, sizeof(**ea));