[asterisk-commits] russell: trunk r349409 - in /trunk: channels/ channels/sip/include/ include/a...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Dec 31 09:46:02 CST 2011
Author: russell
Date: Sat Dec 31 09:45:57 2011
New Revision: 349409
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349409
Log:
Constify tag argument in REF_DEBUG related code.
Modified:
trunk/channels/chan_sip.c
trunk/channels/sip/include/dialog.h
trunk/include/asterisk/astobj2.h
trunk/main/astobj2.c
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=349409&r1=349408&r2=349409
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Dec 31 09:45:57 2011
@@ -2222,7 +2222,7 @@
\return Always returns 0 */
#define append_history(p, event, fmt , args... ) append_history_full(p, "%-15s " fmt, event, ## args)
-struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func)
+struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, const char *tag, char *file, int line, const char *func)
{
if (p)
#ifdef REF_DEBUG
@@ -2235,7 +2235,7 @@
return p;
}
-struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func)
+struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, const char *tag, char *file, int line, const char *func)
{
if (p)
#ifdef REF_DEBUG
Modified: trunk/channels/sip/include/dialog.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/include/dialog.h?view=diff&rev=349409&r1=349408&r2=349409
==============================================================================
--- trunk/channels/sip/include/dialog.h (original)
+++ trunk/channels/sip/include/dialog.h Sat Dec 31 09:45:57 2011
@@ -31,8 +31,8 @@
*/
#define dialog_ref(arg1,arg2) dialog_ref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
#define dialog_unref(arg1,arg2) dialog_unref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
-struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func);
-struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func);
+struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, const char *tag, char *file, int line, const char *func);
+struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, const char *tag, char *file, int line, const char *func);
struct sip_pvt *sip_alloc(ast_string_field callid, struct ast_sockaddr *sin,
int useglobal_nat, const int intended_method, struct sip_request *req);
Modified: trunk/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/astobj2.h?view=diff&rev=349409&r1=349408&r2=349409
==============================================================================
--- trunk/include/asterisk/astobj2.h (original)
+++ trunk/include/asterisk/astobj2.h Sat Dec 31 09:45:57 2011
@@ -207,7 +207,7 @@
#ifdef REF_DEBUG
#define dialog_ref(arg1,arg2) dialog_ref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
#define dialog_unref(arg1,arg2) dialog_unref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
-static struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, const char *file, int line, const char *func)
+static struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, const char *tag, const char *file, int line, const char *func)
{
if (p)
ao2_ref_debug(p, 1, tag, file, line, func);
@@ -216,14 +216,14 @@
return p;
}
-static struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, const char *file, int line, const char *func)
+static struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, const char *tag, const char *file, int line, const char *func)
{
if (p)
ao2_ref_debug(p, -1, tag, file, line, func);
return NULL;
}
#else
-static struct sip_pvt *dialog_ref(struct sip_pvt *p, char *tag)
+static struct sip_pvt *dialog_ref(struct sip_pvt *p, const char *tag)
{
if (p)
ao2_ref(p, 1);
@@ -232,7 +232,7 @@
return p;
}
-static struct sip_pvt *dialog_unref(struct sip_pvt *p, char *tag)
+static struct sip_pvt *dialog_unref(struct sip_pvt *p, const char *tag)
{
if (p)
ao2_ref(p, -1);
@@ -420,7 +420,7 @@
#endif
-void *__ao2_alloc_debug(const size_t data_size, ao2_destructor_fn destructor_fn, char *tag,
+void *__ao2_alloc_debug(const size_t data_size, ao2_destructor_fn destructor_fn, const char *tag,
const char *file, int line, const char *funcname, int ref_debug);
void *__ao2_alloc(const size_t data_size, ao2_destructor_fn destructor_fn);
@@ -462,7 +462,7 @@
#endif
-int __ao2_ref_debug(void *o, int delta, char *tag, char *file, int line, const char *funcname);
+int __ao2_ref_debug(void *o, int delta, const char *tag, char *file, int line, const char *funcname);
int __ao2_ref(void *o, int delta);
/*! @} */
@@ -743,7 +743,7 @@
ao2_hash_fn *hash_fn, ao2_callback_fn *cmp_fn);
struct ao2_container *__ao2_container_alloc_debug(const unsigned int n_buckets,
ao2_hash_fn *hash_fn, ao2_callback_fn *cmp_fn,
- char *tag, char *file, int line, const char *funcname,
+ const char *tag, char *file, int line, const char *funcname,
int ref_debug);
/*! \brief
@@ -794,7 +794,7 @@
#endif
-void *__ao2_link_debug(struct ao2_container *c, void *new_obj, int flags, char *tag, char *file, int line, const char *funcname);
+void *__ao2_link_debug(struct ao2_container *c, void *new_obj, int flags, const char *tag, char *file, int line, const char *funcname);
void *__ao2_link(struct ao2_container *c, void *newobj, int flags);
/*!
@@ -830,7 +830,7 @@
#endif
-void *__ao2_unlink_debug(struct ao2_container *c, void *obj, int flags, char *tag, char *file, int line, const char *funcname);
+void *__ao2_unlink_debug(struct ao2_container *c, void *obj, int flags, const char *tag, char *file, int line, const char *funcname);
void *__ao2_unlink(struct ao2_container *c, void *obj, int flags);
@@ -924,7 +924,7 @@
#endif
void *__ao2_callback_debug(struct ao2_container *c, enum search_flags flags, ao2_callback_fn *cb_fn,
- void *arg, char *tag, char *file, int line, const char *funcname);
+ void *arg, const char *tag, char *file, int line, const char *funcname);
void *__ao2_callback(struct ao2_container *c, enum search_flags flags, ao2_callback_fn *cb_fn, void *arg);
/*! @} */
@@ -957,7 +957,7 @@
#endif
void *__ao2_callback_data_debug(struct ao2_container *c, enum search_flags flags,
- ao2_callback_data_fn *cb_fn, void *arg, void *data, char *tag,
+ ao2_callback_data_fn *cb_fn, void *arg, void *data, const char *tag,
char *file, int line, const char *funcname);
void *__ao2_callback_data(struct ao2_container *c, enum search_flags flags,
ao2_callback_data_fn *cb_fn, void *arg, void *data);
@@ -977,7 +977,7 @@
#endif
-void *__ao2_find_debug(struct ao2_container *c, const void *arg, enum search_flags flags, char *tag,
+void *__ao2_find_debug(struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag,
char *file, int line, const char *funcname);
void *__ao2_find(struct ao2_container *c, const void *arg, enum search_flags flags);
@@ -1139,7 +1139,7 @@
#endif
-void *__ao2_iterator_next_debug(struct ao2_iterator *a, char *tag, char *file, int line, const char *funcname);
+void *__ao2_iterator_next_debug(struct ao2_iterator *a, const char *tag, char *file, int line, const char *funcname);
void *__ao2_iterator_next(struct ao2_iterator *a);
/* extra functions */
Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=349409&r1=349408&r2=349409
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Sat Dec 31 09:45:57 2011
@@ -140,7 +140,7 @@
static struct bucket_entry *internal_ao2_link(struct ao2_container *c, void *user_data, int flags, const char *file, int line, const char *func);
static void *internal_ao2_callback(struct ao2_container *c,
const enum search_flags flags, void *cb_fn, void *arg, void *data, enum ao2_callback_type type,
- char *tag, char *file, int line, const char *funcname);
+ const char *tag, char *file, int line, const char *funcname);
static void *internal_ao2_iterator_next(struct ao2_iterator *a, struct bucket_entry **q);
int __ao2_lock(void *user_data, const char *file, const char *func, int line, const char *var)
@@ -202,7 +202,7 @@
*/
-int __ao2_ref_debug(void *user_data, const int delta, char *tag, char *file, int line, const char *funcname)
+int __ao2_ref_debug(void *user_data, const int delta, const char *tag, char *file, int line, const char *funcname)
{
struct astobj2 *obj = INTERNAL_OBJ(user_data);
@@ -319,7 +319,7 @@
return EXTERNAL_OBJ(obj);
}
-void *__ao2_alloc_debug(size_t data_size, ao2_destructor_fn destructor_fn, char *tag,
+void *__ao2_alloc_debug(size_t data_size, ao2_destructor_fn destructor_fn, const char *tag,
const char *file, int line, const char *funcname, int ref_debug)
{
/* allocation */
@@ -427,7 +427,7 @@
}
struct ao2_container *__ao2_container_alloc_debug(const unsigned int n_buckets, ao2_hash_fn *hash_fn,
- ao2_callback_fn *cmp_fn, char *tag, char *file, int line,
+ ao2_callback_fn *cmp_fn, const char *tag, char *file, int line,
const char *funcname, int ref_debug)
{
/* XXX maybe consistency check on arguments ? */
@@ -507,7 +507,7 @@
return p;
}
-void *__ao2_link_debug(struct ao2_container *c, void *user_data, int flags, char *tag, char *file, int line, const char *funcname)
+void *__ao2_link_debug(struct ao2_container *c, void *user_data, int flags, const char *tag, char *file, int line, const char *funcname)
{
struct bucket_entry *p = internal_ao2_link(c, user_data, flags, file, line, funcname);
@@ -545,7 +545,7 @@
* Unlink an object from the container
* and destroy the associated * bucket_entry structure.
*/
-void *__ao2_unlink_debug(struct ao2_container *c, void *user_data, int flags, char *tag,
+void *__ao2_unlink_debug(struct ao2_container *c, void *user_data, int flags, const char *tag,
char *file, int line, const char *funcname)
{
if (INTERNAL_OBJ(user_data) == NULL) /* safety check on the argument */
@@ -595,7 +595,7 @@
*/
static void *internal_ao2_callback(struct ao2_container *c,
const enum search_flags flags, void *cb_fn, void *arg, void *data, enum ao2_callback_type type,
- char *tag, char *file, int line, const char *funcname)
+ const char *tag, char *file, int line, const char *funcname)
{
int i, start, last; /* search boundaries */
void *ret = NULL;
@@ -775,7 +775,7 @@
}
void *__ao2_callback_debug(struct ao2_container *c, enum search_flags flags,
- ao2_callback_fn *cb_fn, void *arg, char *tag, char *file, int line,
+ ao2_callback_fn *cb_fn, void *arg, const char *tag, char *file, int line,
const char *funcname)
{
return internal_ao2_callback(c,flags, cb_fn, arg, NULL, DEFAULT, tag, file, line, funcname);
@@ -790,7 +790,7 @@
void *__ao2_callback_data_debug(struct ao2_container *c,
const enum search_flags flags,
ao2_callback_data_fn *cb_fn, void *arg, void *data,
- char *tag, char *file, int line, const char *funcname)
+ const char *tag, char *file, int line, const char *funcname)
{
return internal_ao2_callback(c, flags, cb_fn, arg, data, WITH_DATA, tag, file, line, funcname);
}
@@ -804,7 +804,7 @@
/*!
* the find function just invokes the default callback with some reasonable flags.
*/
-void *__ao2_find_debug(struct ao2_container *c, const void *arg, enum search_flags flags, char *tag, char *file, int line, const char *funcname)
+void *__ao2_find_debug(struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag, char *file, int line, const char *funcname)
{
void *arged = (void *) arg;/* Done to avoid compiler const warning */
@@ -916,7 +916,7 @@
return ret;
}
-void *__ao2_iterator_next_debug(struct ao2_iterator *a, char *tag, char *file, int line, const char *funcname)
+void *__ao2_iterator_next_debug(struct ao2_iterator *a, const char *tag, char *file, int line, const char *funcname)
{
struct bucket_entry *p;
void *ret = NULL;
More information about the asterisk-commits
mailing list