[sr-dev] git:master: reg(k): only store path if indicated by the configuration

Henning Westerholt henning.westerholt at 1und1.de
Thu Jul 29 18:43:54 CEST 2010


Module: sip-router
Branch: master
Commit: 1ede271e9b669b2f335858edb47dd260f0d28ad2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1ede271e9b669b2f335858edb47dd260f0d28ad2

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Thu Jul 29 18:42:27 2010 +0200

reg(k): only store path if indicated by the configuration

---

 modules_k/registrar/save.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules_k/registrar/save.c b/modules_k/registrar/save.c
index 4483972..d22def0 100644
--- a/modules_k/registrar/save.c
+++ b/modules_k/registrar/save.c
@@ -269,10 +269,12 @@ static inline ucontact_info_t* pack_ci( struct sip_msg* _m, contact_t* _c,
 			}
 			if (path.len && path.s) {
 				ci.path = &path;
-				/* save in msg too for reply */
-				if (set_path_vector(_m, &path) < 0) {
-					rerrno = R_PARSE_PATH;
-					goto error;
+				if (path_mode != PATH_MODE_OFF) {
+					/* save in msg too for reply */
+					if (set_path_vector(_m, &path) < 0) {
+						rerrno = R_PARSE_PATH;
+						goto error;
+					}
 				}
 			}
 		}




More information about the sr-dev mailing list