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
This commit is contained in:
Kinsey Moore
2013-02-12 20:18:21 +00:00
parent 27867e65d0
commit 81fa307af7
3 changed files with 15 additions and 5 deletions

View File

@@ -1918,7 +1918,15 @@ struct sip_peer *sip_find_peer(const char *peer, struct ast_sockaddr *addr, int
void sip_auth_headers(enum sip_auth_type code, char **header, char **respheader);
const char *sip_get_header(const struct sip_request *req, const char *name);
const char *sip_get_transport(enum sip_transport t);
void *sip_unref_peer(struct sip_peer *peer, char *tag);
#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__)
struct sip_peer *_ref_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);
#else
struct sip_peer *sip_ref_peer(struct sip_peer *peer, char *tag);
void *sip_unref_peer(struct sip_peer *peer, char *tag);
#endif /* REF_DEBUG */
#endif