tweak debug code

This commit is contained in:
Anthony Minessale 2011-07-14 00:12:53 -05:00
parent e339b549e0
commit c9cab41620
2 changed files with 8 additions and 5 deletions

View File

@ -1 +1 @@
Mon Jul 11 17:37:21 CDT 2011
Wed Jul 6 15:11:41 CDT 2011

View File

@ -109,8 +109,8 @@ nua_handle_t *nh_create_handle(nua_t *nua,
assert(nua->nua_home);
//if ((nh = su_home_clone(nua->nua_home, sizeof(*nh)))) {
if ((nh = su_home_clone(NULL, sizeof(*nh)))) {
if ((nh = su_home_clone(nua->nua_home, sizeof(*nh)))) {
//if ((nh = su_home_new(sizeof(*nh)))) {
nh->nh_valid = nua_valid_handle_cookie;
nh->nh_nua = nua;
nh->nh_magic = hmagic;
@ -174,7 +174,7 @@ _nua_handle_ref_by(nua_handle_t *nh,
{
if (nh)
SU_DEBUG_0(("%p - nua_handle_ref() => "MOD_ZU" by %s:%u: %s()\n",
nh, su_home_refcount((su_home_t *)nh) + 1, file, line, by));
nh, su_home_refcount((su_home_t *)nh) + 1, file, line, function));
return (nua_handle_t *)su_home_ref((su_home_t *)nh);
}
@ -186,15 +186,17 @@ _nua_handle_unref_by(nua_handle_t *nh,
if (nh) {
size_t refcount = su_home_refcount((su_home_t *)nh) - 1;
int freed = su_home_unref((su_home_t *)nh);
if (freed) refcount = 0;
SU_DEBUG_0(("%p - nua_handle_unref() => "MOD_ZU" by %s:%u: %s()\n",
nh, refcount, file, line, by));
nh, refcount, file, line, function));
return freed;
}
return 0;
}
#if 0
nua_handle_t *nua_handle_ref(nua_handle_t *nh)
{
return _nua_handle_ref_by(nh, "<app>", 0, "<app>")
@ -204,6 +206,7 @@ int nua_handle_unref(nua_handle_t *nh)
{
return _nua_handle_unref_by(nh, "<app>", 0, "<app>")
}
#endif
#else