Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Issue 2071273004: Call GetAdaptersAddresses in the way recommended by MSDN. (Closed)

Created:
4 years, 6 months ago by Taylor_Brandstetter
Modified:
4 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Call GetAdaptersAddresses in the way recommended by MSDN. Previously, we were calling GetAdaptersAddresses once to get the required buffer size, then a second time to fill the buffer. This method is "strongly discouraged" by MSDN. They recommend an initial size of 15KB to avoid calling GetAdaptersAddresses multiple times. We also were not calling GetAdaptersAddresses in a loop. In between two calls to GetAdaptersAddresses, the required size may increase. Instead of treating this as an error, we now increase our buffer size and try again. BUG=616908, 534463 Committed: https://crrev.com/e5a246f582215340d3c71022a87d4c152a8269df Cr-Commit-Position: refs/heads/master@{#401123}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Responding to review comments. #

Patch Set 3 : Fixing typo. #

Patch Set 4 : Changing size to 15000, not 15360. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -9 lines) Patch
M net/base/network_interfaces_win.cc View 1 2 3 1 chunk +33 lines, -9 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
Taylor_Brandstetter
PTAL. This fixes an issue where WebRTC stops working after a network change event.
4 years, 6 months ago (2016-06-17 22:22:54 UTC) #2
pauljensen
https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode30 net/base/network_interfaces_win.cc:30: const int MAX_GETADAPTERSADDRESSES_TRIES = 100; how about moving this ...
4 years, 6 months ago (2016-06-20 11:32:49 UTC) #3
Sergey Ulanov
Please add 534463 to BUG=. It looks like the same root cause.
4 years, 6 months ago (2016-06-20 22:49:02 UTC) #5
Taylor_Brandstetter
Added link to other bug as requested. https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode30 net/base/network_interfaces_win.cc:30: const int ...
4 years, 6 months ago (2016-06-21 17:06:05 UTC) #7
pauljensen
https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode213 net/base/network_interfaces_win.cc:213: std::unique_ptr<char[]> buf; On 2016/06/21 17:06:05, Taylor_Brandstetter wrote: > On ...
4 years, 6 months ago (2016-06-21 17:20:10 UTC) #8
Taylor_Brandstetter
https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode213 net/base/network_interfaces_win.cc:213: std::unique_ptr<char[]> buf; On 2016/06/21 17:20:10, pauljensen wrote: > On ...
4 years, 6 months ago (2016-06-21 19:50:52 UTC) #9
pauljensen
lgtm with one comment https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode206 net/base/network_interfaces_win.cc:206: ULONG len = 15360; Actually ...
4 years, 6 months ago (2016-06-21 20:32:05 UTC) #10
Taylor_Brandstetter
https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc File net/base/network_interfaces_win.cc (right): https://codereview.chromium.org/2071273004/diff/1/net/base/network_interfaces_win.cc#newcode206 net/base/network_interfaces_win.cc:206: ULONG len = 15360; On 2016/06/21 20:32:05, pauljensen wrote: ...
4 years, 6 months ago (2016-06-21 20:45:18 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2071273004/60001
4 years, 6 months ago (2016-06-21 20:47:55 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-21 22:13:50 UTC) #16
commit-bot: I haz the power
4 years, 6 months ago (2016-06-21 22:15:34 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e5a246f582215340d3c71022a87d4c152a8269df
Cr-Commit-Position: refs/heads/master@{#401123}

Powered by Google App Engine
This is Rietveld 408576698