mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Bugfix: q->buf was not tested for NULL, as it should be. Fix by Simon Duquennoy.
This commit is contained in:
parent
e79c0ab1ee
commit
fa524fabd7
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: csma.c,v 1.26 2011/01/18 16:03:57 adamdunkels Exp $
|
* $Id: csma.c,v 1.27 2011/01/25 14:24:38 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -277,7 +277,7 @@ send_packet(mac_callback_t sent, void *ptr)
|
|||||||
q = memb_alloc(&packet_memb);
|
q = memb_alloc(&packet_memb);
|
||||||
if(q != NULL) {
|
if(q != NULL) {
|
||||||
q->buf = queuebuf_new_from_packetbuf();
|
q->buf = queuebuf_new_from_packetbuf();
|
||||||
if(q != NULL) {
|
if(q->buf != NULL) {
|
||||||
if(packetbuf_attr(PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS) == 0) {
|
if(packetbuf_attr(PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS) == 0) {
|
||||||
/* Use default configuration for max transmissions */
|
/* Use default configuration for max transmissions */
|
||||||
q->max_transmissions = CSMA_MAX_MAC_TRANSMISSIONS;
|
q->max_transmissions = CSMA_MAX_MAC_TRANSMISSIONS;
|
||||||
|
Loading…
Reference in New Issue
Block a user