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

Rename "ueIdLst" to "ueS1apIdPairList" so Test Controller Complies #39

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nickvsnetworking
Copy link

Title

Rename "ueIdLst" to "ueS1apIdPairList" so Test Controller Complies

Summary

Changed variables named "ueIdLst" to "ueS1apIdPairList" in file TestCntlrStub/src/ts_utls.c as outlined in issue here.

Test plan

Confirmed compiled on test environment (was failing prior to change)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 4, 2020
@@ -1765,11 +1765,11 @@ int tsSendResetReq(unsigned int resetType, int numOfUes, unsigned char *ueLst)
((ResetReq*)msgptr)->cause.causeVal = 1;

((ResetReq*)msgptr)->r.partialRst.numOfConn = numOfUes;
((ResetReq*)msgptr)->r.partialRst.ueIdLst = malloc(numOfUes);
memcpy(((ResetReq*)msgptr)->r.partialRst.ueIdLst, ueLst, numOfUes);
((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList = malloc(numOfUes);
Copy link
Member

@VinashakAnkitAman VinashakAnkitAman Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This malloc memory allocation and typecasting looks invalid. "ueIdLst" was a list of U32 UEId values, whereas "ueS1apIdPairList" is a list with structures of 3 U32 values inside each. I believe, this should be like:
((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList =
(NbUeS1apIdPair) malloc(sizeof(NbUeS1apIdPair) * numOfUes);

((ResetReq*)msgptr)->r.partialRst.ueIdLst = malloc(numOfUes);
memcpy(((ResetReq*)msgptr)->r.partialRst.ueIdLst, ueLst, numOfUes);
((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList = malloc(numOfUes);
memcpy(((ResetReq*)msgptr)->r.partialRst.ueS1apIdPairList, ueLst, numOfUes);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the above comment, this memcpy here should be updated as well. Moreover, the "ueLst" variable needs to be updated for this function with the new structure of "ueS1apIdPairList".

Copy link
Contributor

@ulaskozat ulaskozat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the requested changes.

@joary
Copy link

joary commented Apr 13, 2021

Hi @nickvsnetworking, do you plan to invest on this PR and address the comments?

@nickvsnetworking
Copy link
Author

Will try suggested changes and make sure it all compiles before updating PR,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants