From: Adam Dickmeiss Date: Mon, 23 Sep 2013 07:37:34 +0000 (+0200) Subject: yaz_encode_sru_extra: keep existing extra args X-Git-Tag: v4.2.68~4 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=decbbc7c15f7c05fae05f6bcb4e677caf77959da;p=yaz-moved-to-github.git yaz_encode_sru_extra: keep existing extra args --- diff --git a/src/srwutil.c b/src/srwutil.c index 38ee0d0..178d886 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -1101,6 +1101,9 @@ void yaz_encode_sru_extra(Z_SRW_PDU *sr, ODR odr, const char *extra_args) 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));