[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] link down and netconn problem
From: |
Martin Velek |
Subject: |
[lwip-users] link down and netconn problem |
Date: |
Tue, 6 Oct 2009 14:17:06 +0200 |
Hello,
my EMAC driver is capable to detect link down(unplugging eth. cable).
This situation is returned in low_level_output by ERR_IF and
netif->flags &= ~NETIF_FLAG_LINK_UP. This is a normal behavior,
netconn_sendto returns ERR_IF.
However after plugging cable and sending next packet, this operation
fails also with ERR_IF. I have tried to trace programm and this is a
sequence of called functions:
netconn_sendto
netconn_send
do_send - return.
The first line of do_send function contains "if
(!ERR_IS_FATAL(msg->conn->err)) " that causes return without checking
the line status.
Does it mean, that before any netconn_sendto I should set conn->err to ERR_OK?
Martin
P.S.
I am using only one struct netconn per task.