浏览代码

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

Henning Westerholt 15 年之前
父节点
当前提交
1ede271e9b
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      modules_k/registrar/save.c

+ 6 - 4
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;
+					}
 				}
 			}
 		}