[sr-dev] git:master:e5532f05: auth_identity: fix misleading indentation level

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 15 16:27:35 CEST 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-09-15T16:26:43+02:00

auth_identity: fix misleading indentation level

---

Modified: modules/auth_identity/auth_hdrs.c

---

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

---

diff --git a/modules/auth_identity/auth_hdrs.c b/modules/auth_identity/auth_hdrs.c
index aa012d6..708366b 100644
--- a/modules/auth_identity/auth_hdrs.c
+++ b/modules/auth_identity/auth_hdrs.c
@@ -448,7 +448,7 @@ int digeststr_asm(dynstr *sout, struct sip_msg *msg, str *sdate, int iflags)
 
 		/* there was an error or the required header is missing */
 		if (iRes==AUTH_ERROR
-		    || (iRes==AUTH_NOTFOUND && (pactpart[i1].iflag & DS_REQUIRED)))
+				|| (iRes==AUTH_NOTFOUND && (pactpart[i1].iflag & DS_REQUIRED)))
 			return -1;
 
 		switch (pactpart[i1].itype) {
@@ -568,10 +568,12 @@ int append_date(str *sdate, int idatesize, time_t *tout, struct sip_msg *msg)
 	if (sdate && idatesize >= ilen) {
 		memcpy(sdate->s, date_str, ilen);
 		sdate->len=ilen;
-	} else
+	} else {
 		return -5;
-		if (tout)
-			*tout=tdate_now;
+	}
+
+	if (tout)
+		*tout=tdate_now;
 
 	return 0;
 }
@@ -666,24 +668,24 @@ static char *auth_get_hf_name(char *begin, char *end, enum _hdr_types_t *type)
 		goto other;
 	} else {
 		return (p + 1);
- 	}
+	}
 
 	/* Unknown header type */
 other:
 	p = q_memchr(p, ':', end - p);
- 	if (!p) {        /* No double colon found, error.. */
+	if (!p) {        /* No double colon found, error.. */
 		*type = HDR_ERROR_T;
 		return 0;
- 	} else {
+	} else {
 		*type = HDR_OTHER_T;
 		return (p + 1);
- 	}
+	}
 
 	return p;
 }
 
 /* parses buffer that contains a SIP message header, looks for "Contact"
-   header field and returns the value of that */
+ * header field and returns the value of that */
 static int get_contact_body(char *buf, unsigned int len, str *sout)
 {
 	char *end, *s, *tmp, *match;




More information about the sr-dev mailing list