From: Michael Adam Date: Mon, 7 Apr 2008 22:08:41 +0000 (+0200) Subject: libsmbconf: search from the back when getting parameter from text backend X-Git-Tag: samba-3.3.0pre1~2814 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2eb5a681e9e3ff302b5151f25d6856834eae7d54;p=thirdparty%2Fsamba.git libsmbconf: search from the back when getting parameter from text backend so we make sure to always deliver the value last read. Michael --- diff --git a/source/lib/smbconf/smbconf_txt_simple.c b/source/lib/smbconf/smbconf_txt_simple.c index 53768dec88c..8c831f9f81c 100644 --- a/source/lib/smbconf/smbconf_txt_simple.c +++ b/source/lib/smbconf/smbconf_txt_simple.c @@ -462,10 +462,10 @@ static WERROR smbconf_txt_get_parameter(struct smbconf_ctx *ctx, return WERR_NO_SUCH_SERVICE; } - found = smbconf_find_in_array(param, - pd(ctx)->cache->param_names[share_index], - pd(ctx)->cache->num_params[share_index], - ¶m_index); + found = smbconf_reverse_find_in_array(param, + pd(ctx)->cache->param_names[share_index], + pd(ctx)->cache->num_params[share_index], + ¶m_index); if (!found) { return WERR_INVALID_PARAM; }