Module: kamailio Branch: master Commit: a6f9a6b1be2d84cbd5db122e189ee3c65f2e1335 URL: https://github.com/kamailio/kamailio/commit/a6f9a6b1be2d84cbd5db122e189ee3c65f2e1335
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-01-08T20:41:42+01:00 core: added msg_apply_changes_mode parameter - control if message changes are applied before transaction is created --- Modified: src/core/cfg.lex Modified: src/core/cfg.y Modified: src/core/globals.h Modified: src/core/msg_translator.c --- Diff: https://github.com/kamailio/kamailio/commit/a6f9a6b1be2d84cbd5db122e189ee3c65f2e1335.diff Patch: https://github.com/kamailio/kamailio/commit/a6f9a6b1be2d84cbd5db122e189ee3c65f2e1335.patch --- diff --git a/src/core/cfg.lex b/src/core/cfg.lex index 9ba73dd46a0..0834934da48 100644 --- a/src/core/cfg.lex +++ b/src/core/cfg.lex @@ -371,6 +371,7 @@ MAXBUFFER maxbuffer MAXSNDBUFFER maxsndbuffer SQL_BUFFER_SIZE sql_buffer_size MSG_CLONE_EXTRA_SIZE msg_clone_extra_size +MSG_APPLY_CHANGES_MODE msg_apply_changes_mode MSG_RECV_MAX_SIZE msg_recv_max_size TCP_MSG_READ_TIMEOUT tcp_msg_read_timeout TCP_MSG_DATA_TIMEOUT tcp_msg_data_timeout @@ -873,6 +874,7 @@ IMPORTFILE "import_file" <INITIAL>{MAXSNDBUFFER} { count(); yylval.strval=yytext; return MAXSNDBUFFER; } <INITIAL>{SQL_BUFFER_SIZE} { count(); yylval.strval=yytext; return SQL_BUFFER_SIZE; } <INITIAL>{MSG_CLONE_EXTRA_SIZE} { count(); yylval.strval=yytext; return MSG_CLONE_EXTRA_SIZE; } +<INITIAL>{MSG_APPLY_CHANGES_MODE} { count(); yylval.strval=yytext; return MSG_APPLY_CHANGES_MODE; } <INITIAL>{MSG_RECV_MAX_SIZE} { count(); yylval.strval=yytext; return MSG_RECV_MAX_SIZE; } <INITIAL>{TCP_MSG_READ_TIMEOUT} { count(); yylval.strval=yytext; return TCP_MSG_READ_TIMEOUT; } <INITIAL>{TCP_MSG_DATA_TIMEOUT} { count(); yylval.strval=yytext; return TCP_MSG_DATA_TIMEOUT; } diff --git a/src/core/cfg.y b/src/core/cfg.y index 5190e3fc296..bf27986209b 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -432,6 +432,7 @@ extern char *default_routename; %token MAXSNDBUFFER %token SQL_BUFFER_SIZE %token MSG_CLONE_EXTRA_SIZE +%token MSG_APPLY_CHANGES_MODE %token MSG_RECV_MAX_SIZE %token TCP_MSG_READ_TIMEOUT %token TCP_MSG_DATA_TIMEOUT @@ -1072,6 +1073,8 @@ assign_stm: | SQL_BUFFER_SIZE EQUAL error { yyerror("number expected"); } | MSG_CLONE_EXTRA_SIZE EQUAL NUMBER { ksr_msg_clone_extra_size=$3; } | MSG_CLONE_EXTRA_SIZE EQUAL error { yyerror("number expected"); } + | MSG_APPLY_CHANGES_MODE EQUAL NUMBER { ksr_msg_apply_changes_mode=$3; } + | MSG_APPLY_CHANGES_MODE EQUAL error { yyerror("boolean expected"); } | MSG_RECV_MAX_SIZE EQUAL NUMBER { ksr_msg_recv_max_size=$3; } | MSG_RECV_MAX_SIZE EQUAL error { yyerror("number expected"); } | TCP_MSG_READ_TIMEOUT EQUAL NUMBER { ksr_tcp_msg_read_timeout=$3; } diff --git a/src/core/globals.h b/src/core/globals.h index bfbc873b6ce..3b0f496e816 100644 --- a/src/core/globals.h +++ b/src/core/globals.h @@ -251,6 +251,7 @@ extern int ksr_rpc_exec_delta; extern int ksr_udp_receiver_mode; extern int ksr_msg_clone_extra_size; +extern int ksr_msg_apply_changes_mode; extern int ksr_msg_recv_max_size; extern int ksr_tcp_msg_read_timeout; extern int ksr_tcp_msg_data_timeout; diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c index 1c1ed444ea3..5cf2379e011 100644 --- a/src/core/msg_translator.c +++ b/src/core/msg_translator.c @@ -121,6 +121,7 @@ str _ksr_xavp_via_fields = STR_NULL; str _ksr_xavp_via_reply_params = STR_NULL; int ksr_local_rport = 0; str _ksr_via_body_flags = str_init("kvf"); +int ksr_msg_apply_changes_mode = 0; /** per process fixup function for global_req_flags. * It should be called from the configuration framework. _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
