s3: fix s3 winreg server after idl changes.
authorGünther Deschner <gd@samba.org>
Wed, 15 Oct 2008 19:42:59 +0000 (21:42 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 15 Oct 2008 19:45:05 +0000 (21:45 +0200)
Guenther

source3/rpc_server/srv_winreg_nt.c

index 3a03f1809a13977805e72d6844b38f61f2398f0f..7e842ed54d3a8c5bed32c855e55fe6b5e7d075df 100644 (file)
@@ -230,11 +230,11 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
        if ( !regkey )
                return WERR_BADFID;
 
-       if ((r->out.value_length == NULL) || (r->out.type == NULL)) {
+       if ((r->out.data_length == NULL) || (r->out.type == NULL)) {
                return WERR_INVALID_PARAM;
        }
 
-       *r->out.value_length = *r->out.type = REG_NONE;
+       *r->out.data_length = *r->out.type = REG_NONE;
        
        DEBUG(7,("_reg_info: policy key name = [%s]\n", regkey->key->name));
        DEBUG(7,("_reg_info: policy key type = [%08x]\n", regkey->key->type));
@@ -290,8 +290,8 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
                        if (r->out.data_size) {
                                *r->out.data_size = 0;
                        }
-                       if (r->out.value_length) {
-                               *r->out.value_length = 0;
+                       if (r->out.data_length) {
+                               *r->out.data_length = 0;
                        }
                        return status;
                }
@@ -306,18 +306,18 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
                *r->out.type = val->type;
        }
 
-       *r->out.value_length = outbuf_size;
+       *r->out.data_length = outbuf_size;
 
        if ( *r->in.data_size == 0 || !r->out.data ) {
                status = WERR_OK;
-       } else if ( *r->out.value_length > *r->in.data_size ) {
+       } else if ( *r->out.data_length > *r->in.data_size ) {
                status = WERR_MORE_DATA;
        } else {
-               memcpy( r->out.data, outbuf, *r->out.value_length );
+               memcpy( r->out.data, outbuf, *r->out.data_length );
                status = WERR_OK;
        }
 
-       *r->out.data_size = *r->out.value_length;
+       *r->out.data_size = *r->out.data_length;
 
        if (free_prs) prs_mem_free(&prs_hkpd);
        if (free_buf) SAFE_FREE(outbuf);