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

CellularPdnConfig_t has const data members. #167

Closed
thirtytwobits opened this issue May 16, 2024 · 3 comments
Closed

CellularPdnConfig_t has const data members. #167

thirtytwobits opened this issue May 16, 2024 · 3 comments
Assignees

Comments

@thirtytwobits
Copy link

In cellular_types.h the CellularPdnConfig structure has three const char fields making it impossible to use this structure without violating constness.

typedef struct CellularPdnConfig
{
    CellularPdnContextType_t pdnContextType;                   /**< PDN Context type. */
    CellularPdnAuthType_t pdnAuthType;                         /**< PDN Authentication type. */
    const char apnName[ CELLULAR_APN_MAX_SIZE + 1 ];           /**< APN name. */
    const char username[ CELLULAR_PDN_USERNAME_MAX_SIZE + 1 ]; /**< Username. */
    const char password[ CELLULAR_PDN_PASSWORD_MAX_SIZE + 1 ]; /**< Password. */
} CellularPdnConfig_t;

apnName, username, and password all need to be changed to char.

@chinglee-iot
Copy link
Member

@thirtytwobits
Thank you for reporting this issue. We create a PR #168 to address this issue. Once it is merged, we will update in this thread again.

@chinglee-iot
Copy link
Member

The PR #168 is merged. Thank you for reporting this issue.

@thirtytwobits
Copy link
Author

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants