Change dummy address to use 0.0.0.0 instead of ::
This is to not break compatiblity with FF.

https://code.google.com/p/chromium/issues/detail?id=430333

TBR=pthatcher@webrtc.org, juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31979004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7661 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/app/webrtc/webrtcsdp.cc b/app/webrtc/webrtcsdp.cc
index 23b8f3d..c7b34c4 100644
--- a/app/webrtc/webrtcsdp.cc
+++ b/app/webrtc/webrtcsdp.cc
@@ -206,7 +206,9 @@
 // draft-ietf-mmusic-trickle-ice-01
 // When no candidates have been gathered, set the connection
 // address to IP6 ::.
-static const char kDummyAddress[] = "::";
+// TODO(perkj): FF can not parse IP6 ::. See http://crbug/430333
+// Use IPV4 per default.
+static const char kDummyAddress[] = "0.0.0.0";
 static const char kDummyPort[] = "9";
 // RFC 3556
 static const char kApplicationSpecificMaximum[] = "AS";
@@ -675,7 +677,7 @@
     const std::vector<Candidate>& candidates,
     int component_id, std::string* port,
     std::string* ip, std::string* addr_type) {
-  *addr_type = kConnectionIpv6Addrtype;
+  *addr_type = kConnectionIpv4Addrtype;
   *port = kDummyPort;
   *ip = kDummyAddress;
   int current_preference = kPreferenceUnknown;
diff --git a/app/webrtc/webrtcsdp_unittest.cc b/app/webrtc/webrtcsdp_unittest.cc
index ea590db..8655487 100644
--- a/app/webrtc/webrtcsdp_unittest.cc
+++ b/app/webrtc/webrtcsdp_unittest.cc
@@ -213,8 +213,8 @@
     "t=0 0\r\n"
     "a=msid-semantic: WMS local_stream_1 local_stream_2\r\n"
     "m=audio 9 RTP/SAVPF 111 103 104\r\n"
-    "c=IN IP6 ::\r\n"
-    "a=rtcp:9 IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
+    "a=rtcp:9 IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_voice\r\na=ice-pwd:pwd_voice\r\n"
     "a=mid:audio_content_name\r\n"
     "a=sendrecv\r\n"
@@ -234,8 +234,8 @@
     "a=ssrc:4 mslabel:local_stream_2\r\n"
     "a=ssrc:4 label:audio_track_id_2\r\n"
     "m=video 9 RTP/SAVPF 120\r\n"
-    "c=IN IP6 ::\r\n"
-    "a=rtcp:9 IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
+    "a=rtcp:9 IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_video\r\na=ice-pwd:pwd_video\r\n"
     "a=mid:video_content_name\r\n"
     "a=sendrecv\r\n"
@@ -262,8 +262,8 @@
 
 static const char kSdpRtpDataChannelString[] =
     "m=application 9 RTP/SAVPF 101\r\n"
-    "c=IN IP6 ::\r\n"
-    "a=rtcp:9 IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
+    "a=rtcp:9 IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_data\r\n"
     "a=ice-pwd:pwd_data\r\n"
     "a=mid:data_content_name\r\n"
@@ -278,7 +278,7 @@
 
 static const char kSdpSctpDataChannelString[] =
     "m=application 9 DTLS/SCTP 5000\r\n"
-    "c=IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_data\r\n"
     "a=ice-pwd:pwd_data\r\n"
     "a=mid:data_content_name\r\n"
@@ -289,7 +289,7 @@
     "m=application 9 DTLS/SCTP webrtc-datachannel\r\n"
     "a=fmtp:webrtc-datachannel max-message-size=100000\r\n"
     "a=sctp-port 5000\r\n"
-    "c=IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_data\r\n"
     "a=ice-pwd:pwd_data\r\n"
     "a=mid:data_content_name\r\n";
@@ -316,10 +316,10 @@
     "t=0 0\r\n"
     "a=msid-semantic: WMS\r\n"
     "m=audio 9 RTP/SAVPF 111 103 104\r\n"
-    "c=IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
     "a=x-google-flag:conference\r\n"
     "m=video 9 RTP/SAVPF 120\r\n"
-    "c=IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
     "a=x-google-flag:conference\r\n";
 
 static const char kSdpSessionString[] =
@@ -331,8 +331,8 @@
 
 static const char kSdpAudioString[] =
     "m=audio 9 RTP/SAVPF 111\r\n"
-    "c=IN IP6 ::\r\n"
-    "a=rtcp:9 IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
+    "a=rtcp:9 IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_voice\r\na=ice-pwd:pwd_voice\r\n"
     "a=mid:audio_content_name\r\n"
     "a=sendrecv\r\n"
@@ -344,8 +344,8 @@
 
 static const char kSdpVideoString[] =
     "m=video 9 RTP/SAVPF 120\r\n"
-    "c=IN IP6 ::\r\n"
-    "a=rtcp:9 IN IP6 ::\r\n"
+    "c=IN IP4 0.0.0.0\r\n"
+    "a=rtcp:9 IN IP4 0.0.0.0\r\n"
     "a=ice-ufrag:ufrag_video\r\na=ice-pwd:pwd_video\r\n"
     "a=mid:video_content_name\r\n"
     "a=sendrecv\r\n"
@@ -1596,7 +1596,7 @@
   // TODO(pthatcher): We need to temporarily allow the SDP to control
   // this for backwards-compatibility.  Once we don't need that any
   // more, remove this.
-  InjectAfter("m=application 9 RTP/SAVPF 101\r\nc=IN IP6 ::\r\n",
+  InjectAfter("m=application 9 RTP/SAVPF 101\r\nc=IN IP4 0.0.0.0\r\n",
               "b=AS:100\r\n",
               &expected_sdp);
   EXPECT_EQ(expected_sdp, message);