diff options
Diffstat (limited to 'channels/sip/include/sip.h')
-rw-r--r-- | channels/sip/include/sip.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index ab682ebfa..24bb2396e 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -1869,14 +1869,7 @@ 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 ast_transport t); -#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 */ +#define sip_ref_peer(peer, tag) ao2_t_bump(peer, tag) +#define sip_unref_peer(peer, tag) ({ ao2_t_cleanup(peer, tag); (NULL); }) #endif |