]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmbconf: search from the back when getting parameter from text backend
authorMichael Adam <obnox@samba.org>
Mon, 7 Apr 2008 22:08:41 +0000 (00:08 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 23:28:56 +0000 (01:28 +0200)
so we make sure to always deliver the value last read.

Michael

source/lib/smbconf/smbconf_txt_simple.c

index 53768dec88cd78d7656e0b731d001c8df30c1081..8c831f9f81ca586d1e60c3eb440fb537d68dc42c 100644 (file)
@@ -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],
-                                     &param_index);
+       found = smbconf_reverse_find_in_array(param,
+                               pd(ctx)->cache->param_names[share_index],
+                               pd(ctx)->cache->num_params[share_index],
+                               &param_index);
        if (!found) {
                return WERR_INVALID_PARAM;
        }