s4-dsdb-schema_prefixmap: Print debug message when internal failure occurs
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 20 Sep 2010 18:31:20 +0000 (21:31 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Mon, 20 Sep 2010 21:15:24 +0000 (00:15 +0300)
source4/dsdb/schema/schema_prefixmap.c

index 8105f1274da97808763e12166da31da224343286..7151c55b9ea3c23e9ea3543cd84cab5138e030d8 100644 (file)
@@ -188,6 +188,7 @@ static WERROR _dsdb_pfm_make_binary_oid(const char *full_oid, TALLOC_CTX *mem_ct
 
        /* encode oid in BER format */
        if (!ber_write_OID_String(mem_ctx, _bin_oid, full_oid)) {
+               DEBUG(0,("ber_write_OID_String() failed for %s\n", full_oid));
                return WERR_INTERNAL_ERROR;
        }
 
@@ -341,6 +342,8 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct dsdb_schema_prefixmap *pfm, uint32_
        }
 
        if (!pfm_entry) {
+               DEBUG(1,("Failed to find prefixMap entry for ATTID = 0x%08X (%d)\n",
+                        attid, attid));
                return WERR_INTERNAL_ERROR;
        }
 
@@ -363,6 +366,8 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct dsdb_schema_prefixmap *pfm, uint32_
        }
 
        if (!ber_read_OID_String(mem_ctx, bin_oid, _oid)) {
+               DEBUG(0,("ber_read_OID_String() failed for %s\n",
+                        hex_encode_talloc(bin_oid.data, bin_oid.data, bin_oid.length)));
                werr = WERR_INTERNAL_ERROR;
        }