mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
added some debug code to track down pack/unpack problems
(This used to be commit ac9cdab33cddcc5ab00fc21ba79f416f5a9687e7)
This commit is contained in:
parent
ad267718dd
commit
0090b4ee11
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user