diff options
-rw-r--r-- | gatchat/gatppp.c | 7 | ||||
-rw-r--r-- | gatchat/gatppp.h | 3 | ||||
-rw-r--r-- | gatchat/ppp.h | 3 | ||||
-rw-r--r-- | gatchat/ppp_ipcp.c | 8 |
4 files changed, 5 insertions, 16 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 1f5b581d..e7a9f19a 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -465,21 +465,18 @@ void g_at_ppp_unref(GAtPPP *ppp) g_free(ppp); } -void g_at_ppp_set_server_info(GAtPPP *ppp, - const char *local, const char *remote, +void g_at_ppp_set_server_info(GAtPPP *ppp, const char *remote, const char *dns1, const char *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); + ipcp_set_server_info(ppp->ipcp, r, d1, d2); } static GAtPPP *ppp_init_common(GAtHDLC *hdlc) diff --git a/gatchat/gatppp.h b/gatchat/gatppp.h index 3a25380a..450a26df 100644 --- a/gatchat/gatppp.h +++ b/gatchat/gatppp.h @@ -69,8 +69,7 @@ const char *g_at_ppp_get_password(GAtPPP *ppp); void g_at_ppp_set_recording(GAtPPP *ppp, const char *filename); -void g_at_ppp_set_server_info(GAtPPP *ppp, - const char *local_ip, const char *remote_ip, +void g_at_ppp_set_server_info(GAtPPP *ppp, const char *remote_ip, const char *dns1, const char *dns2); #ifdef __cplusplus diff --git a/gatchat/ppp.h b/gatchat/ppp.h index c41cd7f6..d815b9fa 100644 --- a/gatchat/ppp.h +++ b/gatchat/ppp.h @@ -86,8 +86,7 @@ void lcp_protocol_reject(struct pppcp_data *lcp, guint8 *packet, gsize len); /* IPCP related functions */ struct pppcp_data *ipcp_new(GAtPPP *ppp); void ipcp_free(struct pppcp_data *data); -void ipcp_set_server_info(struct pppcp_data *ipcp, guint32 local_addr, - guint32 peer_addr, +void ipcp_set_server_info(struct pppcp_data *ipcp, guint32 peer_addr, guint32 dns1, guint32 dns2); /* CHAP related functions */ diff --git a/gatchat/ppp_ipcp.c b/gatchat/ppp_ipcp.c index 7b244eaa..7d59a4bb 100644 --- a/gatchat/ppp_ipcp.c +++ b/gatchat/ppp_ipcp.c @@ -129,20 +129,14 @@ static void ipcp_reset_server_config_options(struct ipcp_data *ipcp) ipcp_generate_config_options(ipcp); } -void ipcp_set_server_info(struct pppcp_data *pppcp, guint32 local_addr, - guint32 peer_addr, +void ipcp_set_server_info(struct pppcp_data *pppcp, guint32 peer_addr, guint32 dns1, guint32 dns2) { struct ipcp_data *ipcp = pppcp_get_data(pppcp); - ipcp->local_addr = local_addr; ipcp->peer_addr = peer_addr; ipcp->dns1 = dns1; ipcp->dns2 = dns2; - ipcp->is_server = TRUE; - - ipcp_reset_server_config_options(ipcp); - pppcp_set_local_options(pppcp, ipcp->options, ipcp->options_len); } static void ipcp_up(struct pppcp_data *pppcp) |