[sr-dev] git:master:788d84e8: topos: declare variable at the beginning of the block

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 14 10:43:03 CEST 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-08-14T10:42:44+02:00

topos: declare variable at the beginning of the block

---

Modified: src/modules/topos/tps_storage.c

---

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

---

diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index 8d9a888356..69d5c7c2b5 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -210,6 +210,7 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir)
 	str sv;
 	sip_uri_t puri;
 	int i;
+	int contact_len;
 
 	if(dir==TPS_DIR_DOWNSTREAM) {
 		sv = td->bs_contact;
@@ -226,7 +227,7 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir)
 		return -1;
 	}
 
-	int contact_len = sv.len;
+	contact_len = sv.len;
 	if (_tps_contact_host.len)
 		contact_len = sv.len - puri.host.len + _tps_contact_host.len;
 




More information about the sr-dev mailing list