Browse code

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

Jan Janak authored on 24/06/2008 16:13:07
Showing 1 changed files
... ...
@@ -257,6 +257,13 @@ static inline int calculate_hooks(dlg_t* _d)
257 257
 		
258 258
 		if (_d->dst_uri.s) _d->hooks.next_hop = &_d->dst_uri;
259 259
 		else _d->hooks.next_hop = _d->hooks.request_uri;
260
+
261
+		/*
262
+		 * the routes in the hooks need to be reset because if the route_set was dropped somewhere else
263
+		 * then these will remain set without the actual routes existing any more
264
+		 */
265
+		_d->hooks.first_route = 0;
266
+		_d->hooks.last_route = 0; 
260 267
 	}
261 268
 
262 269
 	if ((_d->hooks.request_uri) && (_d->hooks.request_uri->s) && (_d->hooks.request_uri->len)) {