Browse code

core: backup/restore script flags

- safe usage of script flags in nested top routes

Daniel-Constantin Mierla authored on 09/07/2009 10:35:13
Showing 1 changed files
... ...
@@ -1296,9 +1296,15 @@ int run_top_route(struct action* a, sip_msg_t* msg, struct run_act_ctx *c)
1296 1296
 {
1297 1297
 	struct run_act_ctx ctx;
1298 1298
 	struct run_act_ctx *p;
1299
+	int ret;
1300
+	flag_t sfbk;
1301
+
1299 1302
 	p = (c)?c:&ctx;
1303
+	sfbk = getsflags();
1300 1304
 	setsflagsval(0);
1301 1305
 	reset_static_buffer();
1302 1306
 	init_run_actions_ctx(p);
1303
-	return run_actions(p, a, msg);
1307
+	ret = run_actions(p, a, msg);
1308
+	setsflagsval(sfbk);
1309
+	return ret;
1304 1310
 }