ppp_net: add ppp_net_suspend_interface() function

This commit is contained in:
Guillaume Zajac 2011-05-04 17:39:00 +02:00 committed by Denis Kenzior
parent badd5555ec
commit 9fea153593
2 changed files with 10 additions and 0 deletions

View File

@ -107,6 +107,7 @@ const char *ppp_net_get_interface(struct ppp_net *net);
void ppp_net_process_packet(struct ppp_net *net, const guint8 *packet);
void ppp_net_free(struct ppp_net *net);
gboolean ppp_net_set_mtu(struct ppp_net *net, guint16 mtu);
void ppp_net_suspend_interface(struct ppp_net *net);
/* PPP functions related to main GAtPPP object */
void ppp_debug(GAtPPP *ppp, const char *str);

View File

@ -196,3 +196,12 @@ void ppp_net_free(struct ppp_net *net)
g_free(net->if_name);
g_free(net);
}
void ppp_net_suspend_interface(struct ppp_net *net)
{
if (net == NULL || net->channel == NULL)
return;
if (net->watch)
g_source_remove(net->watch);
}