Supported REF_PRINT with specified reference counter
authorRichard Levitte <levitte@openssl.org>
Thu, 5 Dec 2002 00:56:41 +0000 (00:56 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 5 Dec 2002 00:56:41 +0000 (00:56 +0000)
crypto/engine/engine_list.c
e_os.h

index 09303508524ba5b3458e463d5b5a2fb5e984e298..730f415dc88f0c58541e4fb0fb90545fd2cb78a5 100644 (file)
@@ -421,7 +421,7 @@ int ENGINE_free(ENGINE *e)
                }
        i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE);
 #ifdef REF_PRINT
-       REF_PRINT("ENGINE",e);
+       REF_PRINT2("ENGINE",e,struct_ref);
 #endif
        if (i > 0) return 1;
 #ifdef REF_CHECK
diff --git a/e_os.h b/e_os.h
index 58df717722c466763e5382f8667269abb8f076b6..a0ea45fbee8dda30d77c0e6660d48495afc4c70c 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -73,7 +73,9 @@ extern "C" {
 /* Used to checking reference counts, most while doing perl5 stuff :-) */
 #ifdef REF_PRINT
 #undef REF_PRINT
-#define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a)
+#undef REF_PRINT2
+#define REF_PRINT(a,b) REF_PRINT2(a,b,references)
+#define REF_PRINT2(a,b,r)      fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->r,a)
 #endif
 
 #ifndef DEVRANDOM