Skip to content

Instantly share code, notes, and snippets.

@bogdan-iancu
Created March 8, 2016 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan-iancu/031cdeadfae46e5e467a to your computer and use it in GitHub Desktop.
Save bogdan-iancu/031cdeadfae46e5e467a to your computer and use it in GitHub Desktop.
diff --git a/modules/tm/t_msgbuilder.c b/modules/tm/t_msgbuilder.c
index 3ab29d7..cee5a9e 100644
--- a/modules/tm/t_msgbuilder.c
+++ b/modules/tm/t_msgbuilder.c
@@ -603,6 +603,7 @@ static inline int assemble_via(str* dest, struct cell* t, struct socket_info* so
int len;
unsigned int via_len;
str branch_str;
+ str rport_str = str_init(";rport");
struct hostport hp;
if (!t_calc_branch(t, branch, branch_buf, &len)) {
@@ -613,12 +614,8 @@ static inline int assemble_via(str* dest, struct cell* t, struct socket_info* so
branch_str.s = branch_buf;
branch_str.len = len;
-#ifdef XL_DEBUG
- printf("!!!proto: %d\n", sock->proto);
-#endif
-
set_hostport(&hp, 0);
- via = via_builder(&via_len, sock, &branch_str, 0, sock->proto, &hp);
+ via = via_builder(&via_len, sock, &branch_str, &rport_str, sock->proto, &hp);
if (!via) {
LM_ERR("via building failed\n");
return -2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment