2006-01-07 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c - (nm_utils_supplicant_request, nm_utils_supplicant_request_with_check): pass correct buffer length to wpa_ctrl_request() git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1284 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2006-01-07 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/NetworkManagerUtils.c
|
||||||
|
- (nm_utils_supplicant_request, nm_utils_supplicant_request_with_check):
|
||||||
|
pass correct buffer length to wpa_ctrl_request()
|
||||||
|
|
||||||
2006-01-07 Dan Williams <dcbw@redhat.com>
|
2006-01-07 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/nm-device-private.h
|
* src/nm-device-private.h
|
||||||
|
@@ -700,6 +700,9 @@ int nm_utils_ip4_netmask_to_prefix (guint32 ip4_netmask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define SUPPLICANT_DEBUG
|
||||||
|
#define RESPONSE_SIZE 2048
|
||||||
|
|
||||||
char *
|
char *
|
||||||
nm_utils_supplicant_request (struct wpa_ctrl *ctrl,
|
nm_utils_supplicant_request (struct wpa_ctrl *ctrl,
|
||||||
const char *format,
|
const char *format,
|
||||||
@@ -718,10 +721,17 @@ nm_utils_supplicant_request (struct wpa_ctrl *ctrl,
|
|||||||
return NULL;
|
return NULL;
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
response = g_malloc (2048);
|
response = g_malloc (RESPONSE_SIZE);
|
||||||
|
len = RESPONSE_SIZE;
|
||||||
|
#ifdef SUPPLICANT_DEBUG
|
||||||
|
nm_info ("SUP: sending command '%s'", command);
|
||||||
|
#endif
|
||||||
wpa_ctrl_request (ctrl, command, strlen (command), response, &len, NULL);
|
wpa_ctrl_request (ctrl, command, strlen (command), response, &len, NULL);
|
||||||
g_free (command);
|
g_free (command);
|
||||||
response[len] = '\0';
|
response[len] = '\0';
|
||||||
|
#ifdef SUPPLICANT_DEBUG
|
||||||
|
nm_info ("SUP: response was '%s'", response);
|
||||||
|
#endif
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -749,9 +759,16 @@ nm_utils_supplicant_request_with_check (struct wpa_ctrl *ctrl,
|
|||||||
if (!(command = g_strdup_vprintf (format, args)))
|
if (!(command = g_strdup_vprintf (format, args)))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
response = g_malloc (2048);
|
response = g_malloc (RESPONSE_SIZE);
|
||||||
|
len = RESPONSE_SIZE;
|
||||||
|
#ifdef SUPPLICANT_DEBUG
|
||||||
|
nm_info ("SUP: sending command '%s'", command);
|
||||||
|
#endif
|
||||||
wpa_ctrl_request (ctrl, command, strlen (command), response, &len, NULL);
|
wpa_ctrl_request (ctrl, command, strlen (command), response, &len, NULL);
|
||||||
response[len] = '\0';
|
response[len] = '\0';
|
||||||
|
#ifdef SUPPLICANT_DEBUG
|
||||||
|
nm_info ("SUP: response was '%s'", response);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user