[asterisk-commits] mmichelson: branch mmichelson/caller_id r384818 - /team/mmichelson/caller_id/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 5 14:04:52 CDT 2013


Author: mmichelson
Date: Fri Apr  5 14:04:49 2013
New Revision: 384818

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384818
Log:
Add constification where it can be done.


Modified:
    team/mmichelson/caller_id/res/res_sip_caller_id.c

Modified: team/mmichelson/caller_id/res/res_sip_caller_id.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/caller_id/res/res_sip_caller_id.c?view=diff&rev=384818&r1=384817&r2=384818
==============================================================================
--- team/mmichelson/caller_id/res/res_sip_caller_id.c (original)
+++ team/mmichelson/caller_id/res/res_sip_caller_id.c Fri Apr  5 14:04:49 2013
@@ -157,7 +157,7 @@
 	return 0;
 }
 
-static int should_queue_connected_line_update(struct ast_sip_session *session, struct ast_party_id *id)
+static int should_queue_connected_line_update(const struct ast_sip_session *session, const struct ast_party_id *id)
 {
 	/* Invalid number means no update */
 	if (!id->number.valid) {
@@ -197,7 +197,7 @@
 	return 0;
 }
 
-static void queue_connected_line_update(struct ast_sip_session *session, struct ast_party_id *id)
+static void queue_connected_line_update(struct ast_sip_session *session, const struct ast_party_id *id)
 {
 	struct ast_party_connected_line connected;
 	struct ast_set_party_connected_line update_connected;
@@ -266,7 +266,7 @@
 	update_incoming_connected_line(session, rdata);
 }
 
-static void modify_id_header(pj_pool_t *pool, pjsip_fromto_hdr *id_hdr, struct ast_party_id *id)
+static void modify_id_header(pj_pool_t *pool, pjsip_fromto_hdr *id_hdr, const struct ast_party_id *id)
 {
 	pjsip_name_addr *id_name_addr;
 	pjsip_sip_uri *id_uri;
@@ -281,7 +281,7 @@
 	pj_strdup2(pool, &id_uri->user, id->number.str);
 }
 
-static pjsip_fromto_hdr *create_new_id_hdr(const pj_str_t *hdr_name, pjsip_tx_data *tdata, struct ast_party_id *id)
+static pjsip_fromto_hdr *create_new_id_hdr(const pj_str_t *hdr_name, pjsip_tx_data *tdata, const struct ast_party_id *id)
 {
 	pjsip_fromto_hdr *id_hdr;
 	pjsip_fromto_hdr *base;
@@ -308,7 +308,7 @@
 	return id_hdr;
 }
 
-static void add_privacy_header(pjsip_tx_data *tdata, struct ast_party_id *id)
+static void add_privacy_header(pjsip_tx_data *tdata, const struct ast_party_id *id)
 {
 	static const pj_str_t pj_privacy_name = { "Privacy", 7 };
 	static const pj_str_t pj_privacy_value = { "id", 2 };
@@ -330,7 +330,7 @@
 	}
 }
 
-static void add_pai_header(pjsip_tx_data *tdata, struct ast_party_id *id)
+static void add_pai_header(pjsip_tx_data *tdata, const struct ast_party_id *id)
 {
 	static const pj_str_t pj_pai_name = { "P-Asserted-Identity", 19 };
 	pjsip_fromto_hdr *pai_hdr;
@@ -359,7 +359,7 @@
 	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)pai_hdr);
 }
 
-static void add_privacy_params(pjsip_tx_data *tdata, pjsip_fromto_hdr *hdr, struct ast_party_id *id)
+static void add_privacy_params(pjsip_tx_data *tdata, pjsip_fromto_hdr *hdr, const struct ast_party_id *id)
 {
 	static const pj_str_t privacy_str = { "privacy", 7 };
 	static const pj_str_t screen_str = { "screen", 6 };
@@ -406,7 +406,7 @@
 	}
 }
 
-static void add_rpid_header(pjsip_tx_data *tdata, struct ast_party_id *id)
+static void add_rpid_header(pjsip_tx_data *tdata, const struct ast_party_id *id)
 {
 	static const pj_str_t pj_rpid_name = { "Remote-Party-ID", 15 };
 	pjsip_fromto_hdr *rpid_hdr;
@@ -434,7 +434,7 @@
 	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)rpid_hdr);
 }
 
-static void add_id_headers(struct ast_sip_session *session, pjsip_tx_data *tdata, struct ast_party_id *id)
+static void add_id_headers(const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id)
 {
 	if (((id->name.presentation & AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED ||
 			(id->number.presentation & AST_PRES_RESTRICTION) == AST_PRES_RESTRICTED) &&




More information about the asterisk-commits mailing list