sip: request - fix parallel use of dnsrr#1525
Closed
cspiel1 wants to merge 1 commit intobaresip:mainfrom
Closed
Conversation
Collaborator
Author
|
The Windows test run failed with: This is not related to this PR. Edit: Maybe should be made more stable. E.g. Maybe like here #1526 |
Collaborator
Author
|
Converted to draft. Let's first complete this #1520. |
If multiple SIP requests are sent in parallel to the same host then multiple references to the same dnsrr object will be used in different `request` objects. But linking of one `le` to multiple lists is not possible. Now for each `dnsrr` reference an `le` object is created.
3b6081d to
c33092d
Compare
Collaborator
Author
|
It seems that this is the only location where elements are added to multiple lists (parallel SIP requests): $ grep -r -E "list_.*mem_ref" src
src/sip/msg.c: list_append(&msg->hdrl, &hdr->le, mem_ref(hdr));
src/sip/msg.c: list_append(&msg->hdrl, &hdr->le, mem_ref(hdr));
src/sip/request.c: list_append(lst, le, mem_ref(rr));
Thus blowing up the I suggest this solution with alloc |
|
|
||
| list_flush(&req->cachel); | ||
| list_flush(&req->addrl); | ||
| list_flush(&req->srvl); |
Contributor
There was a problem hiding this comment.
srvl must now also be flushed manually.
Collaborator
Author
|
Will be replaced by an |
This file contains hidden or 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
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.
If multiple SIP requests are sent in parallel to the same host then
multiple references to the same dnsrr object will be used in different
requestobjects. But linking of oneleto multiple lists is not possible.Now for each
dnsrrreference anleobject is created.Another solution with deep copy of
dnsrr: #1512