ndr: Fix the error messages, add correct data type name
authorAmitay Isaacs <amitay@gmail.com>
Tue, 28 Feb 2012 03:58:16 +0000 (14:58 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 1 Mar 2012 13:24:49 +0000 (00:24 +1100)
librpc/ndr/ndr_dnsp.c

index daf8fffdef57c0ca0cfca94aad66d12215d900be..347fbed3fd96042e3ae37ba3446d94cb44b427f8 100644 (file)
@@ -48,7 +48,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_name(struct ndr_pull *ndr, int ndr_flag
 
        ret = talloc_strdup(ndr->current_mem_ctx, "");
        if (!ret) {
-               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp");
+               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name");
        }
        total_len = 1;
 
@@ -61,7 +61,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_name(struct ndr_pull *ndr, int ndr_flag
                }
                ret = talloc_realloc(ndr->current_mem_ctx, ret, char, newlen);
                if (!ret) {
-                       return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp");
+                       return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name");
                }
                NDR_CHECK(ndr_pull_bytes(ndr, (uint8_t *)&ret[total_len-1], sublen));
                if (i != count-1) {
@@ -72,10 +72,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_name(struct ndr_pull *ndr, int ndr_flag
        }
        NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, &termination));
        if (termination != 0) {
-               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp - not NUL terminated");
+               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name - not NUL terminated");
        }
        if (ndr->offset > raw_offset + len) {
-               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp - overrun by %u bytes",
+               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_name - overrun by %u bytes",
                                      ndr->offset - (raw_offset + len));
        }
        /* there could be additional pad bytes */
@@ -142,12 +142,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_string(struct ndr_pull *ndr, int ndr_fl
 
        ret = talloc_strdup(ndr->current_mem_ctx, "");
        if (!ret) {
-               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp");
+               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string");
        }
        total_len = 1;
        ret = talloc_zero_array(ndr->current_mem_ctx, char, len+1);
        if (!ret) {
-               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp");
+               return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull dnsp_string");
        }
        NDR_CHECK(ndr_pull_bytes(ndr, (uint8_t *)&ret[total_len-1], len));
        total_len = len;