- int no_targets = 0;
- while (true)
- {
- const char *vhost_cstr =
- yaz_oi_get_string_oidval(&req->otherInfo, VAL_PROXY, no_targets+1,
- 0);
- if (!vhost_cstr)
- break;
- no_targets++;
- if (no_targets > 1000)
- return;
- targets.push_back(vhost_cstr);
- }
- if (no_targets < 2)
+ yp2::util::get_vhost_otherinfo(&req->otherInfo, false, targets);
+
+ if (targets.size() < 1)