reg(k): only store path if indicated by the configuration
authorHenning Westerholt <henning.westerholt@1und1.de>
Thu, 29 Jul 2010 16:42:27 +0000 (18:42 +0200)
committerHenning Westerholt <henning.westerholt@1und1.de>
Thu, 29 Jul 2010 16:42:27 +0000 (18:42 +0200)
modules_k/registrar/save.c

index 4483972..d22def0 100644 (file)
@@ -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;
+                                       }
                                }
                        }
                }