X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-c.c;h=c1dc6526d608db91697393a7249bec97b5220efb;hp=7b19d07a06232336e997b9e7a6b55217c80bd4b8;hb=19e0683f8919ec86f6340c1667da495328ec899a;hpb=76f9c2a86cc9e541f3dc9ca19acdc1d930b0a90e diff --git a/src/zoom-c.c b/src/zoom-c.c index 7b19d07..c1dc652 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -419,7 +419,6 @@ ZOOM_API(void) c->tproxy = xstrdup(val); } - xfree(c->charset); c->charset = 0; val = ZOOM_options_get(c->options, "charset"); @@ -466,20 +465,22 @@ ZOOM_API(void) char *pcomma; char *pequals; while ((pcomma = strchr(remainder, ',')) != 0 && - (pcolon == 0 || pcomma < pcolon)) { + (pcolon == 0 || pcomma < pcolon)) + { *pcomma = '\0'; - if ((pequals = strchr(remainder, '=')) != 0) { + if ((pequals = strchr(remainder, '=')) != 0) + { *pequals = '\0'; - /*printf("# setting '%s'='%s'\n", remainder, pequals+1);*/ ZOOM_connection_option_set(c, remainder, pequals+1); } remainder = pcomma+1; } - if (remainder != c->host_port) { + if (remainder != c->host_port) + { + remainder = xstrdup(remainder); xfree(c->host_port); - c->host_port = xstrdup(remainder); - /*printf("# reset hp='%s'\n", remainder);*/ + c->host_port = remainder; } }