Hello andreip,
I'd like you to do a code review. Please execute
g4 diff -c 8382323
or point your web browser to
http://mondrian/8382323
to review the following code:
Change 8382323 by [EMAIL PROTECTED] on 2008/09/25 11:43:17 *pending*
Adds SSID to WiFi data gathered on Win32 and WinCE and fixes a comment.
R=andreip
[EMAIL PROTECTED]
DELTA=11 (10 added, 1 deleted, 0 changed)
OCL=8382323
Affected files ...
...
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc#3
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h#3
edit
11 delta lines: 10 added, 1 deleted, 0 changed
Also consider running:
g4 lint -c 8382323
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8382323 by [EMAIL PROTECTED] on 2008/09/25 11:43:17 *pending*
Adds SSID to WiFi data gathered on Win32 and WinCE and fixes a comment.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc#3
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h#3
edit
====
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc#3
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc
====
# action=edit type=text
---
googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc
2008-09-25 12:49:04.000000000 +0100
+++
googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.cc
2008-09-25 12:08:24.000000000 +0100
@@ -28,6 +28,7 @@
#include "gears/geolocation/wifi_data_provider_windows_common.h"
#include <assert.h>
+#include "gears/base/common/string_utils.h"
#include "gears/geolocation/device_data_provider.h"
#include "gears/geolocation/wifi_data_provider_common.h"
@@ -36,6 +37,10 @@
assert(access_point_data);
access_point_data->mac_address = MacAddressAsString16(data.MacAddress);
access_point_data->radio_signal_strength = data.Rssi;
+ // Note that _NDIS_802_11_SSID::Ssid::Ssid is not null-terminated.
+ UTF8ToString16(reinterpret_cast<const char*>(data.Ssid.Ssid),
+ data.Ssid.SsidLength,
+ &access_point_data->ssid);
// It appears that we can not get the age of the scan. The only way to get
// this information would be to perform the scan ourselves, which is not
// possible.
====
//depot/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h#3
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h
====
# action=edit type=text
---
googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h
2008-09-25 12:49:04.000000000 +0100
+++
googleclient/gears/opensource/gears/geolocation/wifi_data_provider_windows_common.h
2008-09-25 11:43:22.000000000 +0100
@@ -37,6 +37,11 @@
#else
+// For Win32, _NDIS_WLAN_BSSID etc are defined in ntddndis.h just as they are
+// for WinCE. However, it seems that the definition of _NDIS_WLAN_BSSID does
+// not match the data returned by the WZC functions we use. So we use the
+// modified definitions below.
+
#include <windows.h>
typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
@@ -51,7 +56,6 @@
typedef LONG NDIS_802_11_RSSI;
-// This structure is not quite the same as the WinCE equivalent.
typedef struct _NDIS_WLAN_BSSID {
UCHAR padding1[4];
ULONG Length;