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

Side by Side Diff: webrtc/voice_engine/test/channel_transport/udp_transport_impl.cc

Issue 2606383003: UdpTransport:IsIpAddressValid: Added extra :: check for ipv6 (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 return false; 2868 return false;
2869 } 2869 }
2870 if(nDubbleColons > 1) 2870 if(nDubbleColons > 1)
2871 { 2871 {
2872 return false; 2872 return false;
2873 } 2873 }
2874 if(nColons > 7 || nColons < 2) 2874 if(nColons > 7 || nColons < 2)
2875 { 2875 {
2876 return false; 2876 return false;
2877 } 2877 }
2878 if(nColons < 7 && nDubbleColons == 0)
2879 {
2880 return false;
2881 }
2878 if(!(nDots == 3 || nDots == 0)) 2882 if(!(nDots == 3 || nDots == 0))
2879 { 2883 {
2880 return false; 2884 return false;
2881 } 2885 }
2882 lastColonPos = -1; 2886 lastColonPos = -1;
2883 int32_t charsBeforeColon = 0; 2887 int32_t charsBeforeColon = 0;
2884 for(i = 0; i < nColons; i++) 2888 for(i = 0; i < nColons; i++)
2885 { 2889 {
2886 charsBeforeColon=colonPos[i]-lastColonPos-1; 2890 charsBeforeColon=colonPos[i]-lastColonPos-1;
2887 if(charsBeforeColon > 4) 2891 if(charsBeforeColon > 4)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 if (nDots != 3 || !allUnder256) 3000 if (nDots != 3 || !allUnder256)
2997 { 3001 {
2998 return false; 3002 return false;
2999 } 3003 }
3000 } 3004 }
3001 return true; 3005 return true;
3002 } 3006 }
3003 3007
3004 } // namespace test 3008 } // namespace test
3005 } // namespace webrtc 3009 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698