mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 20:00:09 +01:00
libnm: expose NM_IW_ESSID_MAX_SIZE define
This commit is contained in:
parent
1708e9a3cc
commit
cd00b04099
2 changed files with 6 additions and 4 deletions
|
|
@ -366,4 +366,8 @@ typedef struct {
|
|||
|
||||
/****************************************************************************/
|
||||
|
||||
#define NM_IW_ESSID_MAX_SIZE 32
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* __NM_LIBNM_BASE_H__ */
|
||||
|
|
|
|||
|
|
@ -633,8 +633,6 @@ nm_utils_is_empty_ssid(const guint8 *ssid, gsize len)
|
|||
return _nm_utils_is_empty_ssid_arr(ssid, len);
|
||||
}
|
||||
|
||||
#define ESSID_MAX_SIZE 32
|
||||
|
||||
/**
|
||||
* nm_utils_escape_ssid:
|
||||
* @ssid: (array length=len): pointer to a buffer containing the SSID data
|
||||
|
|
@ -651,7 +649,7 @@ nm_utils_is_empty_ssid(const guint8 *ssid, gsize len)
|
|||
const char *
|
||||
nm_utils_escape_ssid(const guint8 *ssid, gsize len)
|
||||
{
|
||||
static char escaped[ESSID_MAX_SIZE * 2 + 1];
|
||||
static char escaped[NM_IW_ESSID_MAX_SIZE * 2 + 1];
|
||||
const guint8 *s = ssid;
|
||||
char * d = escaped;
|
||||
|
||||
|
|
@ -660,7 +658,7 @@ nm_utils_escape_ssid(const guint8 *ssid, gsize len)
|
|||
return escaped;
|
||||
}
|
||||
|
||||
len = MIN(len, (guint32) ESSID_MAX_SIZE);
|
||||
len = MIN(len, (guint32) NM_IW_ESSID_MAX_SIZE);
|
||||
while (len--) {
|
||||
if (*s == '\0') {
|
||||
*d++ = '\\';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue