Browse Source

registrar: Prevent incorrect application of path when forwarding a register

- Reset the internal path pointer after a save() to prevent it being added
  as a Route: header, e.g. when running t_replicate()
Hugh Waite 11 years ago
parent
commit
61a1eee4fe
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/registrar/save.c

+ 3 - 0
modules/registrar/save.c

@@ -991,6 +991,9 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags, str *_uri)
 			&& !is_cflag_set(REG_SAVE_NORPL_FL) && (reg_send_reply(_m) < 0))
 		return -1;
 
+	if (path_enabled && path_mode != PATH_MODE_OFF) {
+		reset_path_vector(_m);
+	}
 	return ret;
 error:
 	update_stat(rejected_registrations, 1);