summaryrefslogtreecommitdiffstats
path: root/gprs.c
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2012-01-14 21:34:10 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2012-01-14 21:34:10 +0100
commit9e5880ab532f24a2718649946438fd36d824a1de (patch)
treed8b9e6188359ac3fe48f3a6634fee494bdb7bcc4 /gprs.c
parent0497009cbc1ab3bff5406b549ce29333ca8e280e (diff)
downloadhardware_ril_samsung-ril-9e5880ab532f24a2718649946438fd36d824a1de.zip
hardware_ril_samsung-ril-9e5880ab532f24a2718649946438fd36d824a1de.tar.gz
hardware_ril_samsung-ril-9e5880ab532f24a2718649946438fd36d824a1de.tar.bz2
GPRS: fix the route
Note that this fix is not perfect(a better fix would be to retrive the correct route from the ipc(the one retrived before was not the correct route, that's why this fix was done)). Also note that the DNS should be setup in setprop/getprop in order to have data activation fully working. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Diffstat (limited to 'gprs.c')
-rw-r--r--gprs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gprs.c b/gprs.c
index 3b4a9a8..0ef1d19 100644
--- a/gprs.c
+++ b/gprs.c
@@ -131,11 +131,10 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info)
snprintf(local_ip, IP_STRING_SIZE, "%i.%i.%i.%i",(ip_config->ip)[0],(ip_config->ip)[1],
(ip_config->ip)[2],(ip_config->ip)[3]);
- snprintf(gateway, IP_STRING_SIZE, "%i.%i.%i.%i",(ip_config->gateway)[0],(ip_config->gateway)[1],
- (ip_config->gateway)[2],(ip_config->gateway)[3]);
+ snprintf(gateway, IP_STRING_SIZE, "%i.%i.%i.%i",(ip_config->ip)[0],(ip_config->ip)[1],
+ (ip_config->ip)[2],(ip_config->ip)[3]);
- snprintf(subnet_mask, IP_STRING_SIZE, "%i.%i.%i.%i",(ip_config->subnet_mask)[0],(ip_config->subnet_mask)[1],
- (ip_config->subnet_mask)[2],(ip_config->subnet_mask)[3]);
+ snprintf(subnet_mask, IP_STRING_SIZE, "255.255.255.255");
snprintf(dns1, IP_STRING_SIZE, "%i.%i.%i.%i",(ip_config->dns1)[0],(ip_config->dns1)[1],
(ip_config->dns1)[2],(ip_config->dns1)[3]);
@@ -145,15 +144,13 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info)
LOGD("GPRS configuration: ip:%s, gateway:%s, subnet_mask:%s, dns1:%s, dns2:%s",
local_ip, gateway, subnet_mask ,dns1, dns2);
-
rc = ifc_configure(INTERFACE,
inet_addr(local_ip),
inet_addr(subnet_mask),
inet_addr(gateway),
inet_addr(dns1),
inet_addr(dns2));
-
- // FIXME: check rc
+ LOGD("ifc_configure: %d",rc);
response[0] = "0"; //FIXME: connection id
response[1] = INTERFACE;