FreeRTOS / FreeRTOS-Cellular-Interface

FreeRTOS Cellular Interface implementation of the 3GPP TS v27.007 standard.
MIT License
85 stars 59 forks source link

CellularPdnConfig_t has const data members. #167

Closed thirtytwobits closed 6 months ago

thirtytwobits commented 6 months ago

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 commented 6 months ago

@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 commented 6 months ago

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

thirtytwobits commented 5 months ago

Thanks so much!