Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00037 #ifndef action_h
00038 #define action_h
00039
00040 #define USE_LONGJMP
00041
00042 #include "route_struct.h"
00043
00044 #include "parser/msg_parser.h"
00045
00046 #ifdef USE_LONGJMP
00047 #include <setjmp.h>
00048 #endif
00049
00050
00051 struct run_act_ctx{
00052 int rec_lev;
00053 int run_flags;
00054 int last_retcode;
00055 #ifdef USE_LONGJMP
00056 jmp_buf jmp_env;
00057 #endif
00058 };
00059
00060
00061 #define init_run_actions_ctx(ph) \
00062 do{\
00063 (ph)->rec_lev=(ph)->run_flags=(ph)->last_retcode=0; \
00064 }while(0)
00065
00066 int do_action(struct run_act_ctx* c, struct action* a, struct sip_msg* msg);
00067 int run_actions(struct run_act_ctx* c, struct action* a, struct sip_msg* msg);
00068
00069 int run_top_route(struct action* a, sip_msg_t* msg, struct run_act_ctx* c);
00070
00071
00072 #ifdef USE_LONGJMP
00073 int run_actions_safe(struct run_act_ctx* c, struct action* a,
00074 struct sip_msg* msg);
00075 #else
00076 #define run_actions_safe(c, a, m) run_actions(c, a, m)
00077 #endif
00078
00079 #endif