X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ffilter_multi.cpp;h=778a527a1e2dc5509341a645c87492dc39d924bf;hb=cb2392725943f140c8d30638344b562a060bedf1;hp=468ccdf94f8b51c3007923065895dcea2d0d194e;hpb=63dda9fef8b647d491dd2baef8ec4f4f88ee1b11;p=metaproxy-moved-to-github.git diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index 468ccdf..778a527 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_multi.cpp,v 1.3 2006-01-16 15:51:56 adam Exp $ +/* $Id: filter_multi.cpp,v 1.4 2006-01-17 13:34:51 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -286,20 +286,9 @@ void yf::Multi::Frontend::init(Package &package, Z_GDU *gdu) std::list targets; - 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) { package.move(); return;