summaryrefslogtreecommitdiffstats
path: root/gprs.c
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2012-01-14 21:50:32 +0100
committerPaulK <contact@paulk.fr>2012-01-14 21:50:32 +0100
commitc8958a5dd0f16ddee23e02fe9914287725b55427 (patch)
treeda7d256f664cf471badae50e4ce7f300b63c916e /gprs.c
parent9e5880ab532f24a2718649946438fd36d824a1de (diff)
downloadhardware_ril_samsung-ril-c8958a5dd0f16ddee23e02fe9914287725b55427.zip
hardware_ril_samsung-ril-c8958a5dd0f16ddee23e02fe9914287725b55427.tar.gz
hardware_ril_samsung-ril-c8958a5dd0f16ddee23e02fe9914287725b55427.tar.bz2
Fixed DNS configuration
Diffstat (limited to 'gprs.c')
-rw-r--r--gprs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gprs.c b/gprs.c
index 0ef1d19..0437fe4 100644
--- a/gprs.c
+++ b/gprs.c
@@ -24,6 +24,7 @@
#define LOG_TAG "RIL-GPRS"
#include <utils/Log.h>
+#include <cutils/properties.h>
#include "samsung-ril.h"
#include "util.h"
@@ -124,6 +125,9 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info)
char dns1[IP_STRING_SIZE];
char dns2[IP_STRING_SIZE];
+ char dns_prop_name[PROPERTY_KEY_MAX];
+ char gw_prop_name[PROPERTY_KEY_MAX];
+
char *response[3];
int rc;
@@ -152,6 +156,13 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info)
inet_addr(dns2));
LOGD("ifc_configure: %d",rc);
+ snprintf(dns_prop_name, sizeof(dns_prop_name), "net.%s.dns1", INTERFACE);
+ property_set(dns_prop_name, dns1);
+ snprintf(dns_prop_name, sizeof(dns_prop_name), "net.%s.dns2", INTERFACE);
+ property_set(dns_prop_name, dns2);
+ snprintf(gw_prop_name, sizeof(gw_prop_name), "net.%s.gw", INTERFACE);
+ property_set(dns_prop_name, gateway);
+
response[0] = "0"; //FIXME: connection id
response[1] = INTERFACE;
response[2] = local_ip;