Blob Blame History Raw
From: Razvan Crainea <razvan@opensips.org>
Date: Thu, 13 Jul 2017 14:13:05 +0300
Subject: [PATCH] drouting: fix parameters specifications for gw detection
 functions

(cherry picked from commit 991b3ef4fabb4a21dd0f95ea18a5e934261be01c)

diff --git a/modules/drouting/drouting.c b/modules/drouting/drouting.c
index 49c931ea2..a73112e7e 100644
--- a/modules/drouting/drouting.c
+++ b/modules/drouting/drouting.c
@@ -4286,7 +4286,7 @@ static int goes_to_gw_1(struct sip_msg* msg, char * part, char* _type, char* fla
 				GET_NEXT_HOP(msg));
 	} else {
 		gw_attrs_spec = (pv_spec_p)flags_pv;
-		return _is_dr_uri_gw(msg, NULL, _type, (!part ? -1 : (int)(long)part),
+		return _is_dr_uri_gw(msg, NULL, flags_pv, (!_type ? -1 : (int)(long)_type),
 				GET_NEXT_HOP(msg));
 	}
 }
@@ -4325,7 +4325,7 @@ static int dr_is_gw(struct sip_msg* msg, char * part, char* src_pv, char* type_s
 			return -1;
 		}
 		gw_attrs_spec = (pv_spec_p)flags_pv;
-		return _is_dr_uri_gw(msg, NULL, type_s ,!src_pv ? -1:(int)(long)src_pv
+		return _is_dr_uri_gw(msg, NULL, flags_pv ,!type_s ? -1:(int)(long)type_s
 				,&src.rs);
 	}
 }