[sr-dev] git:master:35fa264f: auth_db: removed trailing spaces for sane git diff

Daniel-Constantin Mierla miconda at gmail.com
Sun Feb 7 20:00:31 CET 2016


Module: kamailio
Branch: master
Commit: 35fa264fe9a70627e9f17f75e0ce39ddbd3550ba
URL: https://github.com/kamailio/kamailio/commit/35fa264fe9a70627e9f17f75e0ce39ddbd3550ba

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-02-07T19:54:47+01:00

auth_db: removed trailing spaces for sane git diff

---

Modified: modules/auth_db/auth_db_mod.c
Modified: modules/auth_db/authorize.c

---

Diff:  https://github.com/kamailio/kamailio/commit/35fa264fe9a70627e9f17f75e0ce39ddbd3550ba.diff
Patch: https://github.com/kamailio/kamailio/commit/35fa264fe9a70627e9f17f75e0ce39ddbd3550ba.patch

---

diff --git a/modules/auth_db/auth_db_mod.c b/modules/auth_db/auth_db_mod.c
index abd9c29..3f22f4f 100644
--- a/modules/auth_db/auth_db_mod.c
+++ b/modules/auth_db/auth_db_mod.c
@@ -1,4 +1,4 @@
-/* 
+/*
  * Digest Authentication Module
  *
  * Copyright (C) 2001-2003 FhG Fokus
@@ -15,8 +15,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
@@ -134,7 +134,7 @@ static param_export_t params[] = {
  * Module interface
  */
 struct module_exports exports = {
-	"auth_db", 
+	"auth_db",
 	DEFAULT_DLFLAGS, /* dlopen flags */
 	cmds,       /* Exported functions */
 	params,     /* Exported parameters */
@@ -153,7 +153,7 @@ static int child_init(int rank)
 {
 	if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN)
 		return 0; /* do nothing for the main process */
-	
+
 	auth_db_handle = auth_dbf.init(&db_url);
 	if (auth_db_handle == 0){
 		LM_ERR("unable to connect to the database\n");
@@ -220,7 +220,7 @@ static int w_is_subscriber(sip_msg_t *msg, char *_uri, char* _table,
 {
 	str suri;
 	str stable;
-	int iflags;
+	int iflags = 0;
 	int ret;
 	sip_uri_t puri;
 
@@ -356,7 +356,7 @@ int parse_aaa_pvs(char *definition, pv_elem_t **pv_def, int *cnt)
 
 		/* definition is between p and e */
 		/* search backwards because PV definition may contain '=' characters */
-		for (sep = end; sep >= p && *sep != '='; sep--); 
+		for (sep = end; sep >= p && *sep != '='; sep--);
 		if (sep > p) {
 			/* pv=column style */
 			/* set column name */
@@ -385,7 +385,7 @@ int parse_aaa_pvs(char *definition, pv_elem_t **pv_def, int *cnt)
 				goto parse_error;
 			}
 			pv.len = snprintf(pv.s, pve->text.len + 7, "$avp(%.*s)",
-			                  pve->text.len, pve->text.s);
+					pve->text.len, pve->text.s);
 		}
 
 		/* create a pv spec */
diff --git a/modules/auth_db/authorize.c b/modules/auth_db/authorize.c
index 86e1cb7..c307326 100644
--- a/modules/auth_db/authorize.c
+++ b/modules/auth_db/authorize.c
@@ -15,8 +15,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
@@ -126,7 +126,7 @@ int fetch_credentials(sip_msg_t *msg, str *user, str* domain, str *table, int fl
 }
 
 static inline int get_ha1(struct username* _username, str* _domain,
-			  const str* _table, char* _ha1, db1_res_t** res)
+		const str* _table, char* _ha1, db1_res_t** res)
 {
 	pv_elem_t *cred;
 	db_key_t keys[2];
@@ -496,10 +496,10 @@ int auth_check(struct sip_msg* _m, char* _realm, char* _table, char *_flags)
 
 	if(ret==AUTH_OK && hdr!=NULL && (iflags&AUTH_CHECK_ID_F)) {
 		srealm = ((auth_body_t*)(hdr->parsed))->digest.username.user;
-			
+
 		if((furi=parse_from_uri(_m))==NULL)
 			return AUTH_ERROR;
-		
+
 		if(_m->REQ_METHOD==METHOD_REGISTER || _m->REQ_METHOD==METHOD_PUBLISH) {
 			if((turi=parse_to_uri(_m))==NULL)
 				return AUTH_ERROR;




More information about the sr-dev mailing list