Bugfix by Henrik Mäkitaavola: check that ICMP6 process is defined before invoking it
This commit is contained in:
parent
ee11b61064
commit
7615a6cf47
|
@ -29,7 +29,7 @@
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: tcpip.c,v 1.21 2009/04/13 19:54:07 nvt-se Exp $
|
* $Id: tcpip.c,v 1.22 2010/01/25 13:37:05 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
|
@ -113,8 +113,10 @@ static u8_t (* outputfunc)(uip_lladdr_t *a);
|
||||||
u8_t
|
u8_t
|
||||||
tcpip_output(uip_lladdr_t *a)
|
tcpip_output(uip_lladdr_t *a)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
if(outputfunc != NULL) {
|
if(outputfunc != NULL) {
|
||||||
return outputfunc(a);
|
ret = outputfunc(a);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
UIP_LOG("tcpip_output: Use tcpip_set_outputfunc() to set an output function");
|
UIP_LOG("tcpip_output: Use tcpip_set_outputfunc() to set an output function");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -320,8 +322,6 @@ udp_broadcast_new(u16_t port, void *appstate)
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
#endif /* UIP_UDP */
|
#endif /* UIP_UDP */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#if UIP_CONF_ICMP6
|
#if UIP_CONF_ICMP6
|
||||||
u8_t
|
u8_t
|
||||||
|
@ -334,11 +334,14 @@ icmp6_new(void *appstate) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tcpip_icmp6_call(u8_t type) {
|
void
|
||||||
|
tcpip_icmp6_call(u8_t type)
|
||||||
|
{
|
||||||
|
if(uip_icmp6_conns.appstate.p != PROCESS_NONE) {
|
||||||
process_post_synch(uip_icmp6_conns.appstate.p, type, 0);
|
process_post_synch(uip_icmp6_conns.appstate.p, type, 0);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* UIP_CONF_ICMP6 */
|
#endif /* UIP_CONF_ICMP6 */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue