summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-02-12 20:18:21 +0000
committerKinsey Moore <kmoore@digium.com>2013-02-12 20:18:21 +0000
commit81fa307af708dc8017dba85a6ec1d93adcae3b5b (patch)
tree20f3d97d76dcd81186567d60392e82c0e3b60da4 /channels/chan_sip.c
parent27867e65d038e244d7dee68cc94eba47286506d5 (diff)
Fix some more REF_DEBUG-related build errors
When sip_ref_peer and sip_unref_peer were exported to be usable in channels/sip/security_events.c, modifications to those functions when building under REF_DEBUG were not taken into account. This change moves the necessary defines into sip.h to make them accessible to other parts of chan_sip that need them. ........ Merged revisions 381282 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b7603b691..f6c8b90c0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -241,6 +241,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
balanced, along with the complete history for that object.
In normal operation, the macros defined will throw away the tags, so they do not
affect the speed of the program at all. They can be considered to be documentation.
+
+ Note: This must also be enabled in channels/sip/security_events.c
*/
/* #define REF_DEBUG 1 */
@@ -3291,9 +3293,7 @@ cleanup:
}
#ifdef REF_DEBUG
-#define sip_ref_peer(arg1,arg2) _ref_peer((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
-#define sip_unref_peer(arg1,arg2) _unref_peer((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
-static struct sip_peer *_ref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
+struct sip_peer *_ref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
{
if (peer)
__ao2_ref_debug(peer, 1, tag, file, line, func);
@@ -3302,7 +3302,7 @@ static struct sip_peer *_ref_peer(struct sip_peer *peer, char *tag, char *file,
return peer;
}
-static struct sip_peer *_unref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
+void *_unref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
{
if (peer)
__ao2_ref_debug(peer, -1, tag, file, line, func);