Bug 973832 - Update NetUtils for gonk-kk. r=vchang
authorKai-Zhen Li <kli@mozilla.com>
Tue, 18 Feb 2014 18:37:39 +0800
changeset 169918 57c2112ea885b571b16fb744f97f90c2559e56d4
parent 169917 47f9517744eaff3d6ce6ac42d44a2f8e5fb22e86
child 169919 58b4952966721a708a220212621b91a7e8fc10bb
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersvchang
bugs973832
milestone30.0a1
Bug 973832 - Update NetUtils for gonk-kk. r=vchang
dom/network/src/NetUtils.cpp
--- a/dom/network/src/NetUtils.cpp
+++ b/dom/network/src/NetUtils.cpp
@@ -169,13 +169,22 @@ int32_t NetUtils::do_dhcp_do_request(con
     // JB 4.3
     // http://androidxref.com/4.3_r2.1/xref/system/core/libnetutils/dhcp_utils.c#181
     DEFINE_DLFUNC(dhcp_do_request, int32_t, const char*, char*, char*,  uint32_t*, char**, char*, uint32_t*, char*, char*)
     USE_DLFUNC(dhcp_do_request)
     char *dns[3] = {dns1, dns2, nullptr};
     char domains[PROPERTY_VALUE_MAX];
     ret = dhcp_do_request(ifname, ipaddr, gateway, prefixLength, dns,
                           server, lease, vendorinfo, domains);
+  } else if (sdkVersion == 19) {
+    // JB 4.4
+    // http://androidxref.com/4.4_r1/xref/system/core/libnetutils/dhcp_utils.c#18
+    DEFINE_DLFUNC(dhcp_do_request, int32_t, const char*, char*, char*,  uint32_t*, char**, char*, uint32_t*, char*, char*, char*)
+    USE_DLFUNC(dhcp_do_request)
+    char *dns[3] = {dns1, dns2, nullptr};
+    char domains[PROPERTY_VALUE_MAX];
+    char mtu[PROPERTY_VALUE_MAX];
+    ret = dhcp_do_request(ifname, ipaddr, gateway, prefixLength, dns, server, lease, vendorinfo, domains, mtu);
   } else {
     NS_WARNING("Unable to perform do_dhcp_request: unsupported sdk version!");
   }
   return ret;
 }