X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fkcontrol.c;h=4594a907742e2fd9d2613c1bd497f576b9e45178;hb=c66753469d139c4233a3572edf4b15b0497e0f28;hp=e5d2b6bdd5435f91b1c60eea73b3e723c19a7bdd;hpb=ecb3935e78cd9bcfdebafdee0834cfb1060d7b5e;p=idzebra-moved-to-github.git diff --git a/index/kcontrol.c b/index/kcontrol.c index e5d2b6b..4594a90 100644 --- a/index/kcontrol.c +++ b/index/kcontrol.c @@ -1,5 +1,5 @@ -/* $Id: kcontrol.c,v 1.2 2006-05-10 08:13:21 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: kcontrol.c,v 1.4 2006-08-14 10:40:15 adam Exp $ + Copyright (C) 1995-2006 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include @@ -53,8 +53,10 @@ static void my_dec(struct rset_key_control *kc) } } + struct rset_key_control *zebra_key_control_create(ZebraHandle zh) { + const char *res_val; struct rset_key_control *kc = xmalloc(sizeof(*kc)); struct context_control *cp = xmalloc(sizeof(*cp)); @@ -64,6 +66,12 @@ struct rset_key_control *zebra_key_control_create(ZebraHandle zh) kc->cmp = key_compare_it; kc->key_logdump_txt = key_logdump_txt; kc->getseq = key_get_seq; + res_val = zebra_get_resource(zh, "segment", 0); + kc->get_segment = 0; + if (res_val && atoi(res_val)) + { + kc->get_segment = key_get_segment; + } zebra_limit_for_rset(zh->m_limit, &kc->filter_func, &cp->filter_destroy,