summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/tdb/tdbutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index b253d5044a..5675061b37 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -105,6 +105,8 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...)
int len;
char *s;
char *buf0 = buf;
+ char *fmt0 = fmt;
+ int bufsize0 = bufsize;
va_list ap;
char c;
@@ -162,6 +164,10 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...)
}
va_end(ap);
+
+ DEBUG(8,("tdb_pack(%s, %d) -> %d\n",
+ fmt0, bufsize0, (int)PTR_DIFF(buf, buf0)));
+
return PTR_DIFF(buf, buf0);
}
@@ -178,6 +184,8 @@ int tdb_unpack(char *buf, int bufsize, char *fmt, ...)
void **p;
char *s, **b;
char *buf0 = buf;
+ char *fmt0 = fmt;
+ int bufsize0 = bufsize;
va_list ap;
char c;
@@ -233,6 +241,10 @@ int tdb_unpack(char *buf, int bufsize, char *fmt, ...)
}
va_end(ap);
+
+ DEBUG(8,("tdb_unpack(%s, %d) -> %d\n",
+ fmt0, bufsize0, (int)PTR_DIFF(buf, buf0)));
+
return PTR_DIFF(buf, buf0);
no_space: