PPP, CORE, functions ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() replaced with defines

PPP is now pointerful for a while, we don't need anymore accessor functions
for the unique PPP local and static control block. Replaced
ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() functions to
defines.

Removed pppapi_do_ppp_set_netif_statuscallback() and
pppapi_do_ppp_set_netif_linkcallback(), they were useless because
netif_set_status_callback() and netif_set_link_callback() can be
safely called while PPP status is in dead (= non open) state
and even before the PPP session is actually created at all.
This commit is contained in:
Sylvain Rochet
2015-02-24 20:33:15 +01:00
parent b4990b5bb4
commit 00bb70a62d
4 changed files with 5 additions and 105 deletions

View File

@@ -388,36 +388,6 @@ fail:
return ERR_VAL;
}
#if LWIP_NETIF_STATUS_CALLBACK
/** Set the status callback of a PPP's netif
*
* @param pcb The PPP descriptor returned by ppp_new()
* @param status_callback pointer to the status callback function
*
* @see netif_set_status_callback
*/
void
ppp_set_netif_statuscallback(ppp_pcb *pcb, netif_status_callback_fn status_callback)
{
netif_set_status_callback(pcb->netif, status_callback);
}
#endif /* LWIP_NETIF_STATUS_CALLBACK */
#if LWIP_NETIF_LINK_CALLBACK
/** Set the link callback of a PPP's netif
*
* @param pcb The PPP descriptor returned by ppp_new()
* @param link_callback pointer to the link callback function
*
* @see netif_set_link_callback
*/
void
ppp_set_netif_linkcallback(ppp_pcb *pcb, netif_status_callback_fn link_callback)
{
netif_set_link_callback(pcb->netif, link_callback);
}
#endif /* LWIP_NETIF_LINK_CALLBACK */
/**********************************/
/*** LOCAL FUNCTION DEFINITIONS ***/