yaz-client: otherinfo missing if facet is in use
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 4 Aug 2010 08:38:21 +0000 (10:38 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 4 Aug 2010 08:38:21 +0000 (10:38 +0200)
Do not skip index 0 of user-defined otherinfos if facets is in use.

client/client.c

index a3442dc..c6c1ab3 100644 (file)
@@ -245,14 +245,13 @@ static void do_hex_dump(const char* buf, size_t len)
 void add_otherInfos(Z_APDU *a)
 {
     Z_OtherInformation **oi;
-    int i = 0;
+    int i;
 
     yaz_oi_APDU(a, &oi);
     if (facet_list) {
         yaz_oi_set_facetlist_oid(oi, out, yaz_oid_userinfo_facet_1, 1, facet_list);
-        i++;
     }
-    for(; i<maxOtherInfosSupported; ++i)
+    for (i = 0; i < maxOtherInfosSupported; ++i)
     {
         if (oid_oidlen(extraOtherInfos[i].oid) > 0)
             yaz_oi_set_string_oid(oi, out, extraOtherInfos[i].oid,