forked from OpenSIPS/opensips
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to 2.1 #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Force pushing all reply lumps (headers added to the reply) when using t_reply_with_body() - the function takes the msg from the transaction, not the real msg; so we need to be sure that the msg in transaction was fully cloned. Reported by Giuseppe Cardone on mailing list.
Reported by David Sanders (@dsanders11). Closes #644 .
(cherry picked from commit 566d4db)
(cherry picked from commit 684846d)
* proper error messages on compress * correct buffer size aproximation on gzip compress(10% + 12) * fix bug on decompression
(cherry picked from commit ec25c07)
(cherry picked from commit b9fe3c2)
(cherry picked from commit ffb2554)
This affects timers and failure routes that are supposed to reuse a static context
This patch fixes a well-hidden TCP connection referencing bug which would only reveal itself upon running into failed TCP send() operations due to various reasons (e.g. full send buffer) in high-traffic environments. Credits to Hieu Ta and Don Steul from Jibe Mobile for detailed reporting and providing an adequate replication environment (cherry picked from commit 3e1a1a7)
Also add a handy macro for future usage (cherry picked from commit 48b88bd) Conflicts: modules/emergency/emergency_methods.c modules/emergency/subscriber_emergency.c modules/usrloc/udomain.c
Credits go to 46Labs for discovering and providing test scenarios (cherry picked from commit 28bcadf)
Credits go to 46labs for debugging this (cherry picked from commit c18c8ea)
If the async engine in TM detects a SIP retransmission, break script and run the Post Script callbacks, othewise the transaction will stay ref'ed for ever. Credits for spotting this problem go to Razvan Crainea.
(cherry picked from commit 3ae7e37172b5ce3142e8448972a84a49d0faa53a)
This fix prevents transactions from being unrefferenced when dangling transaction pointers remain stored in static variables. (cherry picked from commit 3f3b6fd)
This commit fixes context_alloc memory leak (cherry picked from commit d69d085)
(cherry picked from commit 5286558)
* if a void string was given to the function ("") 0 value was returned which was not correct * input values should be checked for NULL
(cherry picked from commit 19edf61)
In case the acc_evi_request() function was used on a failed request (code < 300), send a missed event rather than the normal one. Reported by Trevor Francis from 46Labs (cherry picked from commit 18f5da0)
When moving stored parameters from Branch AVP to Dialog variable, make sure that the integer value "setid" is handled correctly so that it remains valid for the remainder of the dialog. (cherry picked from commit e267e9e)
(cherry picked from commit 5cfd916)
If a STR is register to the context, a valid STR * will be always returned , so we need to test the content, not the pointer. (cherry picked from commit 968a8a8)
In case the CFGFILE changes in the init script, opensips will still start with the compiled file instead of the one configured (cherry picked from commit 030efef)
This allows you to print the protocol you received, and its associated port (cherry picked from commit 0ae5ba2)
(cherry picked from commit 00d052c)
If the SIP URI does not have an explicit port or proto, determine the default port/proto in a SIP wise manner (rather than returning 5060 / UDP) (Ex: sip:example.com;transport=tls has default port 5061 and not 5060 ; or sips:example.com has default proto TLS and not UDP). Affected variables are $dp, $rp, $op and $dP, $rP, $oP (cherry picked from commit 6cc850e)
Using gcc 4.8.4, we would get: net/trans.c:43:2: warning: missing initializer for field ‘name’ of ‘struct proto_info’ [-Wmissing-field-initializers] { }, /* PROTO_NONE */ ^ (cherry picked from commit 376579f)
The db_text makes no difference between NULL or "empty string" values in DB -> both are internally translated as NULL . The dialplan module, in a very abusive way, forces "not null" (in DB schema and in the code for data validation) even for columns that are optional (like subst_exp, repl_exp, timerec and attrs). Besides being bogus (if a column is not to be used, you have to set it to empty string rather than let it NULL), it makes impossible the usage of db_text with dialplan. This fix allows (DB and code) the mentioned DB columns to be also NULL. The change is backward compatible, it should not break any existing usage of the dialplan module. (cherry picked from commit 8f54897)
This commit closes #916 Thanks to @Tinet-AaronAn for reporting the issue (cherry picked from commit 2a4f686d4997b814eeaa425dc23fe822cb8ef91a)
In case a group is not found, return -1 instead of true
If the config script does not include any Request-URI altering logic (e.g. no lookup() or $ru manipulation), the acc module would incorrectly fill in a "msg->new_uri" field which should NOT be freed into the SIP request structure, leading to the memory pool being corrupted upon transaction release. Credits to Guillaume Lacroix for reporting (cherry picked from commit 02cb9f0)
Print the name of the route too - the ID is irrelevant for the script writter. (cherry picked from commit 4094818)
(cherry picked from commit 70db2cf)
(cherry picked from commit 8dd10d85b408947576223e75a67228ed7c7abd91)
When creating the blacklists, use the port and protocol of the destination too, otherwise the rules may conflict or be too wide to be used (like 2 destinations with same IP but different ports). (cherry picked from commit 0495faa)
When creating the blacklists, use the port and protocol of the destination too, otherwise the rules may conflict or be too wide to be used (like 2 destinations with same IP but different ports). (cherry picked from commit 97f309c)
When creating the blacklists, use the port and protocol of the destination too, otherwise the rules may conflict or be too wide to be used (like 2 destinations with same IP but different ports). (cherry picked from commit 7fa9cee)
Before the advertised_port/address are preserved only in the UAS part of the transaction - that means it is only one value and it is from the setting done in Request Route; whatever later setting done in Failure Route or Branch Route are not preserved at transaction level (even if they are used on the spot, for sending out the INVITE). So, when we have to build a local request (ACK or CANCEL), we do not remember which specific address/port were advertised for that particular UAC (branch). Fixes #917. (cherry picked from commit eb850a2)
Instead of copying the branch value from a previous statefull Via header (which may lead to overflow as OpenSIPS has a maximum value for the built branch), we generate a new branch value based on the previous Via branch - in this way, we have full controll over the length of the resulting Branch and we also inherit the uniqueness of the branch value (from the prev Via hdr). Reported by Gupta, Rahul and Elliott, Ray (cherry picked from commit 482e643)
(cherry picked from commit d8bf10d)
Before this commit, the protocol check was hardcoded in the module. This commit allows to add in the permissions table any transport protocol supported. Thanks go to Kirill Galinurov for reporting this! (cherry picked from commit 0eecff9)
(cherry picked from commit 17beb2d)
This leak occures in function get_group_id() when do_routing is called without parameters in opensips.cfg. In this case the dr_default_grp variable is not equal -1 and 'return dr_default_grp' is executed without freeing the res variable previously allocated for query execution. (cherry picked from commit 6573994)
"res" cannot be null at that point (cherry picked from commit 0b60681)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.