-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: main
Are you sure you want to change the base?
Rename "ueIdLst" to "ueS1apIdPairList" so Test Controller Complies #39
Conversation
@@ -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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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".
There was a problem hiding this 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.
Hi @nickvsnetworking, do you plan to invest on this PR and address the comments? |
Will try suggested changes and make sure it all compiles before updating PR, |
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)