summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-06-28 17:38:54 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-06-28 17:38:54 -0500
commit90d240820bd9cbb01d0e4e9af5223ff2bc078375 (patch)
treece33a4c4d7358daa85c173fd3cdb3abdef1b5bcc /gatchat/gatppp.c
parentb6601bfeedb3871d423135b1d4e1b9c35ceeef91 (diff)
downloadofono-90d240820bd9cbb01d0e4e9af5223ff2bc078375.tar.bz2
ppp: Tweak the set_server_info API
Diffstat (limited to 'gatchat/gatppp.c')
-rw-r--r--gatchat/gatppp.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index b65733ee..1f5b581d 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -465,10 +465,21 @@ void g_at_ppp_unref(GAtPPP *ppp)
g_free(ppp);
}
-void g_at_ppp_set_server_info(GAtPPP *ppp, guint32 local, guint32 peer,
- guint32 dns1, guint32 dns2)
+void g_at_ppp_set_server_info(GAtPPP *ppp,
+ const char *local, const char *remote,
+ const char *dns1, const char *dns2)
{
- ipcp_set_server_info(ppp->ipcp, local, peer, dns1, dns2);
+ guint32 l = 0;
+ guint32 r = 0;
+ guint32 d1 = 0;
+ guint32 d2 = 0;
+
+ inet_pton(AF_INET, local, &l);
+ inet_pton(AF_INET, remote, &r);
+ inet_pton(AF_INET, dns1, &d1);
+ inet_pton(AF_INET, dns2, &d2);
+
+ ipcp_set_server_info(ppp->ipcp, l, r, d1, d2);
}
static GAtPPP *ppp_init_common(GAtHDLC *hdlc)