[asterisk-commits] mmichelson: branch mmichelson/authenticate r381197 - /team/mmichelson/authent...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 11 13:14:17 CST 2013


Author: mmichelson
Date: Mon Feb 11 13:14:14 2013
New Revision: 381197

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381197
Log:
Constify some stuff in res_sip_authenticator.c


Modified:
    team/mmichelson/authenticate/res/res_sip_authenticator_digest.c

Modified: team/mmichelson/authenticate/res/res_sip_authenticator_digest.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/authenticate/res/res_sip_authenticator_digest.c?view=diff&rev=381197&r1=381196&r2=381197
==============================================================================
--- team/mmichelson/authenticate/res/res_sip_authenticator_digest.c (original)
+++ team/mmichelson/authenticate/res/res_sip_authenticator_digest.c Mon Feb 11 13:14:14 2013
@@ -31,7 +31,7 @@
 	<support_level>core</support_level>
  ***/
 
-char entity_id[AST_UUID_STR_LEN];
+static char entity_id[AST_UUID_STR_LEN];
 
 /*!
  * \brief Determine if authentication is required
@@ -190,7 +190,7 @@
  * \param rdata The incoming request
  * \param realm The realm for which authentication should occur
  */
-static int build_nonce(struct ast_str **nonce, char *timestamp, pjsip_rx_data *rdata, const char *realm)
+static int build_nonce(struct ast_str **nonce, const char *timestamp, const pjsip_rx_data *rdata, const char *realm)
 {
 	struct ast_str *str = ast_str_create(64);
 	char hash[32];
@@ -218,7 +218,7 @@
  * \retval 0 Nonce does not pass validity checks
  * \retval 1 Nonce passes validity check
  */
-static int check_nonce(const char *candidate, pjsip_rx_data *rdata, struct ast_sip_auth *auth)
+static int check_nonce(const char *candidate, const pjsip_rx_data *rdata, const struct ast_sip_auth *auth)
 {
 	char *copy = ast_strdupa(candidate);
 	char *timestamp = strsep(&copy, "/");
@@ -246,7 +246,7 @@
 	return 1;
 }
 
-static int find_challenge(pjsip_rx_data *rdata, struct ast_sip_auth *auth)
+static int find_challenge(const pjsip_rx_data *rdata, const struct ast_sip_auth *auth)
 {
 	struct pjsip_authorization_hdr *auth_hdr = (pjsip_authorization_hdr *) &rdata->msg_info.msg->hdr;
 	int challenge_found = 0;
@@ -266,7 +266,7 @@
 /*!
  * \brief Common code for initializing a pjsip_auth_srv
  */
-static void setup_auth_srv(pj_pool_t *pool, pjsip_auth_srv *auth_server, struct ast_sip_auth *auth)
+static void setup_auth_srv(pj_pool_t *pool, pjsip_auth_srv *auth_server, const struct ast_sip_auth *auth)
 {
 	pj_str_t realm;
 	pj_cstr(&realm, auth->realm);
@@ -313,7 +313,7 @@
  * \param tdata The response to add the challenge to
  * \param rdata The request the challenge is in response to
  */
-static void challenge(struct ast_sip_auth *auth, pjsip_tx_data *tdata, pjsip_rx_data *rdata)
+static void challenge(const struct ast_sip_auth *auth, pjsip_tx_data *tdata, const pjsip_rx_data *rdata)
 {
 	pj_str_t qop;
 	pj_str_t pj_nonce;




More information about the asterisk-commits mailing list