Index: channels/chan_misdn.c =================================================================== --- channels/chan_misdn.c (revision 46037) +++ channels/chan_misdn.c (working copy) @@ -274,9 +274,9 @@ static int *misdn_ports; -static void chan_misdn_log(int level, int port, char *tmpl, ...); +static void chan_misdn_log(const int level, const int port, const char *tmpl, ...); -static struct ast_channel *misdn_new(struct chan_list *cl, int state, char *exten, char *callerid, int format, int port, int c); +static struct ast_channel* misdn_new(struct chan_list *cl, const int state, const char *exten, const char *callerid, const int format, const int port, const int c); static void send_digit_to_chan(struct chan_list *cl, char digit ); static void hangup_chan(struct chan_list *ch); @@ -3087,7 +3087,7 @@ } -static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char *exten, char *callerid, int format, int port, int c) +static struct ast_channel* misdn_new(struct chan_list* chlist, const int state, const char *exten, const char *callerid, const int format, const int port, const int c) { struct ast_channel *tmp; @@ -5129,7 +5129,7 @@ -void chan_misdn_log(int level, int port, char *tmpl, ...) +void chan_misdn_log(const int level, const int port, const char *tmpl, ...) { if (! ((0 <= port) && (port <= max_ports))) { ast_log(LOG_WARNING, "cb_log called with out-of-range port number! (%d)\n", port); Index: include/asterisk/pbx.h =================================================================== --- include/asterisk/pbx.h (revision 46037) +++ include/asterisk/pbx.h (working copy) @@ -729,39 +729,39 @@ int pbx_checkcondition(const char *condition); /* Functions for returning values from structures */ -const char *ast_get_context_name(struct ast_context *con); -const char *ast_get_extension_name(struct ast_exten *exten); -struct ast_context *ast_get_extension_context(struct ast_exten *exten); -const char *ast_get_include_name(struct ast_include *include); -const char *ast_get_ignorepat_name(struct ast_ignorepat *ip); -const char *ast_get_switch_name(struct ast_sw *sw); -const char *ast_get_switch_data(struct ast_sw *sw); +const char *ast_get_context_name(const struct ast_context *con); +const char *ast_get_extension_name(const struct ast_exten *exten); +struct ast_context* ast_get_extension_context(const struct ast_exten *exten); +const char *ast_get_include_name(const struct ast_include *include); +const char *ast_get_ignorepat_name(const struct ast_ignorepat *ip); +const char *ast_get_switch_name(const struct ast_sw *sw); +const char *ast_get_switch_data(const struct ast_sw *sw); /* Other extension stuff */ -int ast_get_extension_priority(struct ast_exten *exten); -int ast_get_extension_matchcid(struct ast_exten *e); -const char *ast_get_extension_cidmatch(struct ast_exten *e); -const char *ast_get_extension_app(struct ast_exten *e); -const char *ast_get_extension_label(struct ast_exten *e); -void *ast_get_extension_app_data(struct ast_exten *e); +int ast_get_extension_priority(const struct ast_exten *exten); +int ast_get_extension_matchcid(const struct ast_exten *e); +const char *ast_get_extension_cidmatch(const struct ast_exten *e); +const char *ast_get_extension_app(const struct ast_exten *e); +const char *ast_get_extension_label(const struct ast_exten *e); +void* ast_get_extension_app_data(const struct ast_exten *e); /* Registrar info functions ... */ -const char *ast_get_context_registrar(struct ast_context *c); -const char *ast_get_extension_registrar(struct ast_exten *e); -const char *ast_get_include_registrar(struct ast_include *i); -const char *ast_get_ignorepat_registrar(struct ast_ignorepat *ip); -const char *ast_get_switch_registrar(struct ast_sw *sw); +const char *ast_get_context_registrar(const struct ast_context *c); +const char *ast_get_extension_registrar(const struct ast_exten *e); +const char *ast_get_include_registrar(const struct ast_include *i); +const char *ast_get_ignorepat_registrar(const struct ast_ignorepat *ip); +const char *ast_get_switch_registrar(const struct ast_sw *sw); /* Walking functions ... */ -struct ast_context *ast_walk_contexts(struct ast_context *con); -struct ast_exten *ast_walk_context_extensions(struct ast_context *con, - struct ast_exten *priority); +struct ast_context* ast_walk_contexts(const struct ast_context *con); +struct ast_exten* ast_walk_context_extensions(const struct ast_context *con, + const struct ast_exten *priority); struct ast_exten *ast_walk_extension_priorities(struct ast_exten *exten, - struct ast_exten *priority); -struct ast_include *ast_walk_context_includes(struct ast_context *con, - struct ast_include *inc); -struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, - struct ast_ignorepat *ip); + const struct ast_exten *priority); +struct ast_include* ast_walk_context_includes(const struct ast_context *con, + struct ast_include *inc); +struct ast_ignorepat* ast_walk_context_ignorepats(const struct ast_context *con, + struct ast_ignorepat *ip); struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw *sw); int pbx_builtin_serialize_variables(struct ast_channel *chan, char *buf, size_t size); Index: main/pbx.c =================================================================== --- main/pbx.c (revision 46037) +++ main/pbx.c (working copy) @@ -5764,37 +5764,37 @@ /* * Name functions ... */ -const char *ast_get_context_name(struct ast_context *con) +const char *ast_get_context_name(const struct ast_context *con) { return con ? con->name : NULL; } -struct ast_context *ast_get_extension_context(struct ast_exten *exten) +struct ast_context* ast_get_extension_context(const struct ast_exten *exten) { return exten ? exten->parent : NULL; } -const char *ast_get_extension_name(struct ast_exten *exten) +const char *ast_get_extension_name(const struct ast_exten *exten) { return exten ? exten->exten : NULL; } -const char *ast_get_extension_label(struct ast_exten *exten) +const char *ast_get_extension_label(const struct ast_exten *exten) { return exten ? exten->label : NULL; } -const char *ast_get_include_name(struct ast_include *inc) +const char *ast_get_include_name(const struct ast_include *inc) { return inc ? inc->name : NULL; } -const char *ast_get_ignorepat_name(struct ast_ignorepat *ip) +const char *ast_get_ignorepat_name(const struct ast_ignorepat *ip) { return ip ? ip->pattern : NULL; } -int ast_get_extension_priority(struct ast_exten *exten) +int ast_get_extension_priority(const struct ast_exten *exten) { return exten ? exten->priority : -1; } @@ -5802,57 +5802,57 @@ /* * Registrar info functions ... */ -const char *ast_get_context_registrar(struct ast_context *c) +const char *ast_get_context_registrar(const struct ast_context *c) { return c ? c->registrar : NULL; } -const char *ast_get_extension_registrar(struct ast_exten *e) +const char *ast_get_extension_registrar(const struct ast_exten *e) { return e ? e->registrar : NULL; } -const char *ast_get_include_registrar(struct ast_include *i) +const char *ast_get_include_registrar(const struct ast_include *i) { return i ? i->registrar : NULL; } -const char *ast_get_ignorepat_registrar(struct ast_ignorepat *ip) +const char *ast_get_ignorepat_registrar(const struct ast_ignorepat *ip) { return ip ? ip->registrar : NULL; } -int ast_get_extension_matchcid(struct ast_exten *e) +int ast_get_extension_matchcid(const struct ast_exten *e) { return e ? e->matchcid : 0; } -const char *ast_get_extension_cidmatch(struct ast_exten *e) +const char *ast_get_extension_cidmatch(const struct ast_exten *e) { return e ? e->cidmatch : NULL; } -const char *ast_get_extension_app(struct ast_exten *e) +const char *ast_get_extension_app(const struct ast_exten *e) { return e ? e->app : NULL; } -void *ast_get_extension_app_data(struct ast_exten *e) +void* ast_get_extension_app_data(const struct ast_exten *e) { return e ? e->data : NULL; } -const char *ast_get_switch_name(struct ast_sw *sw) +const char *ast_get_switch_name(const struct ast_sw *sw) { return sw ? sw->name : NULL; } -const char *ast_get_switch_data(struct ast_sw *sw) +const char *ast_get_switch_data(const struct ast_sw *sw) { return sw ? sw->data : NULL; } -const char *ast_get_switch_registrar(struct ast_sw *sw) +const char *ast_get_switch_registrar(const struct ast_sw *sw) { return sw ? sw->registrar : NULL; } @@ -5860,13 +5860,13 @@ /* * Walking functions ... */ -struct ast_context *ast_walk_contexts(struct ast_context *con) +struct ast_context* ast_walk_contexts(const struct ast_context *con) { return con ? con->next : contexts; } -struct ast_exten *ast_walk_context_extensions(struct ast_context *con, - struct ast_exten *exten) +struct ast_exten* ast_walk_context_extensions(const struct ast_context *con, + const struct ast_exten *exten) { if (!exten) return con ? con->root : NULL; @@ -5884,13 +5884,13 @@ } struct ast_exten *ast_walk_extension_priorities(struct ast_exten *exten, - struct ast_exten *priority) + const struct ast_exten *priority) { return priority ? priority->peer : exten; } -struct ast_include *ast_walk_context_includes(struct ast_context *con, - struct ast_include *inc) +struct ast_include* ast_walk_context_includes(const struct ast_context *con, + const struct ast_include *inc) { if (!inc) return con ? con->includes : NULL; @@ -5898,8 +5898,8 @@ return inc->next; } -struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, - struct ast_ignorepat *ip) +struct ast_ignorepat* ast_walk_context_ignorepats(const struct ast_context *con, + const struct ast_ignorepat *ip) { if (!ip) return con ? con->ignorepats : NULL; Index: utils/ael_main.c =================================================================== --- utils/ael_main.c (revision 46037) +++ utils/ael_main.c (working copy) @@ -59,8 +59,8 @@ } } -struct namelist *create_name(char *name); -struct namelist *create_name(char *name) +struct namelist* create_name(const char *name); +struct namelist* create_name(const char *name) { struct namelist *x = (struct namelist *)calloc(sizeof(struct namelist),1); strncpy(x->name,name,100);