Re: [lwip-users] lwip adding a pcb into active lsit which is already inserted

2016-09-09 Thread Sergio R. Caprile
You should not free the pcb in the error callback, it does not get a pcb 
as a parameter (unless you provide it). It is intended for you to free 
your resources (if any).


Some people advocate for the check your goesintos mantra.
I personally prefer smaller and tighter code.
There is a nice compromise in the form of assertions that can be easily 
disabled once code has been (kind of) debugged, and lwIP more or less 
follows this approach.
If you could give more details on the exact sequence you called 
functions and/or the code followed, perhaps one of the developers 
"fixes" this one you've found and an assertion is triggered next time. 
Or did you disable assertions ?





___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] lwip adding a pcb into active lsit which is already inserted

2016-09-08 Thread christian . neubert

I finally fixed this problem. I was using a pcb after it was freed (the
error callback freed the pcb) and I also had some synchronity problems.

What I don´t get is, why does the LWIP code not check if the pcb us already
freed? Does it assume it only gets right and working pcbs?


> I would start by checking that the ethernet driver works, the port
> works, take a known to  work application and make sure that everything
> works.
> If errors arise here, it is quite possible that either the driver is
> buggy or the port is buggy. All calls to low-level functions must be in
> the same thread.
> Once that is checked and confirmed functional, I would continue by
> providing information on what API I am using on my application, and at
> what point something fails, after trying to collect more information
> with a debugger. All calls to the RAW API must be on the same thread.
> Each socket must be used from within one thread (well..., but let's keep
> it simple, and I'm no expert on this)


Geschickt flexibel verbunden – jetzt auch mit IO-Link: der neue
elektronische Sicherungsautomat Typ REX12 http://www.e-t-a.de/NEU_REX12/
A neat and smart connection – available with IO-Link: the new electronic
circuit protector REX12 http://www.e-t-a.de/NEW_REX12/
_
E-T-A Elektrotechnische Apparate GmbH
Geschäftsführer: Dr. Clifford Sell
Sitz der Gesellschaft: Altdorf bei Nürnberg, Registergericht HR B 377___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] lwip adding a pcb into active lsit which is already inserted

2016-09-07 Thread Sergio R. Caprile
I would start by checking that the ethernet driver works, the port 
works, take a known to  work application and make sure that everything 
works.
If errors arise here, it is quite possible that either the driver is 
buggy or the port is buggy. All calls to low-level functions must be in 
the same thread.
Once that is checked and confirmed functional, I would continue by 
providing information on what API I am using on my application, and at 
what point something fails, after trying to collect more information 
with a debugger. All calls to the RAW API must be on the same thread. 
Each socket must be used from within one thread (well..., but let's keep 
it simple, and I'm no expert on this)



___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users