Skip to content
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

Unify the way _socketsMap is populated #1434

Closed
czunker opened this issue Aug 3, 2023 · 2 comments · Fixed by #1928
Closed

Unify the way _socketsMap is populated #1434

czunker opened this issue Aug 3, 2023 · 2 comments · Fixed by #1928
Assignees
Labels

Comments

@czunker
Copy link
Contributor

czunker commented Aug 3, 2023

What is not working as you expected it?
We currently have two different ways, to fill the _socketsMap:

p.Cache.Store("_socketsMap", &resources.CacheEntry{Data: socketsMap, Error: socketsErr})

and

processes.MqlResource().Cache.Store("_socketsMap", &resources.CacheEntry{Data: processesBySocket, Error: nil})

The implementation in port was introduced with #531.

The current assumption is, we could use the way it is done in port.go also in processes.go to only have one way of getting the information.

Where on the platform does it happen?
cnquery

@czunker czunker self-assigned this Aug 3, 2023
@czunker
Copy link
Contributor Author

czunker commented Aug 3, 2023

This should be done after the plugin refactoring is done.

czunker added a commit that referenced this issue Sep 26, 2023
Fixes #1434

Signed-off-by: Christian Zunker <[email protected]>
@arlimus arlimus added the v9.1 label Oct 2, 2023
@arlimus
Copy link
Member

arlimus commented Oct 2, 2023

Apart from the proposed improvements in #1928, I double-checked it against main on 6e2a951 and noticed (1) we only have one way of handling the internal ports list now (via processes2ports on mqlPorts) and (2) it is only modified by processesBySocket now

@arlimus arlimus closed this as completed Oct 2, 2023
czunker added a commit that referenced this issue Oct 5, 2023
Fixes #1434

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 10, 2023
Fixes #1434

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 10, 2023
Fixes #1434

Signed-off-by: Christian Zunker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants