samr_lookup_names "none found" error needed corrections with empty lists.
authorLuke Leighton <lkcl@samba.org>
Fri, 19 Feb 1999 17:41:05 +0000 (17:41 +0000)
committerLuke Leighton <lkcl@samba.org>
Fri, 19 Feb 1999 17:41:05 +0000 (17:41 +0000)
(This used to be commit e164b5080ca966de4227277f7ac031bc96d056ad)

source3/rpc_parse/parse_samr.c

index cadeffdfd0e447d473b902ef53c26746e0e22f9d..fb9392501133fc5f3854ea5e71b52a5def7657da 100644 (file)
@@ -3385,10 +3385,10 @@ void samr_io_r_lookup_names(char *desc,  SAMR_R_LOOKUP_NAMES *r_u, prs_struct *p
 
        prs_uint32("num_rids1", ps, depth, &(r_u->num_rids1));
        prs_uint32("ptr_rids ", ps, depth, &(r_u->ptr_rids ));
-       prs_uint32("num_rids2", ps, depth, &(r_u->num_rids2));
 
        if (r_u->ptr_rids != 0 && r_u->num_rids1 != 0)
        {
+               prs_uint32("num_rids2", ps, depth, &(r_u->num_rids2));
                for (i = 0; i < r_u->num_rids2; i++)
                {
                        prs_grow(ps);
@@ -3399,10 +3399,10 @@ void samr_io_r_lookup_names(char *desc,  SAMR_R_LOOKUP_NAMES *r_u, prs_struct *p
 
        prs_uint32("num_types1", ps, depth, &(r_u->num_types1));
        prs_uint32("ptr_types ", ps, depth, &(r_u->ptr_types ));
-       prs_uint32("num_types2", ps, depth, &(r_u->num_types2));
 
        if (r_u->ptr_types != 0 && r_u->num_types1 != 0)
        {
+               prs_uint32("num_types2", ps, depth, &(r_u->num_types2));
                for (i = 0; i < r_u->num_types2; i++)
                {
                        prs_grow(ps);