Browse Source

- reset pointes when route set is missing, patch provided by Dragos Vingarnzan
closes SER-266

Jan Janak 17 years ago
parent
commit
4cb3eb66a7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      modules/tm/dlg.c

+ 7 - 0
modules/tm/dlg.c

@@ -257,6 +257,13 @@ static inline int calculate_hooks(dlg_t* _d)
 		
 		if (_d->dst_uri.s) _d->hooks.next_hop = &_d->dst_uri;
 		else _d->hooks.next_hop = _d->hooks.request_uri;
+
+		/*
+		 * the routes in the hooks need to be reset because if the route_set was dropped somewhere else
+		 * then these will remain set without the actual routes existing any more
+		 */
+		_d->hooks.first_route = 0;
+		_d->hooks.last_route = 0; 
 	}
 
 	if ((_d->hooks.request_uri) && (_d->hooks.request_uri->s) && (_d->hooks.request_uri->len)) {