lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] message posting and fetching


From: Naveen reddy
Subject: [lwip-users] message posting and fetching
Date: Mon, 30 Jan 2012 16:52:14 +0530

Dear all LWIP users,
   I am facing problem with posting a message to the mail box and fetching it in tcpip thread. Well the detailed explanation of problem is,
I am using ppp over serial and also socket api for reading and writing http data to lwip. When the serial connection is broke down I want close all the socket connections and have to call ppp_sighup() function to bring the session down. Here the problem is when the link is broke down, lwip_write() function is blocked expecting an ACK for previously sent packet. So in order to make sure lwip_write() will not block forever, I added a timeout, so that it returns after timeout has happened and then I can close all the socket connections and call ppp_sighup(). Now if I call lwip_close() function it crashes saying pcb must be freed before calling this function. So I freed the pcb by making use helper function tcp_remove_all(). Now When I call lwip_close() function for all socket connections, the last connection (say I have 3 connections and two connections will be closed without any problem) will abort saying "Assertion "tcpip_thread: invalid message" failed at line 179 in lwip/src/api/tcpip.c". But when I see the log I am posting the message at say x pointer, message is being fetched at same x pointer. Why this problem occurs, does anyone experienced this strange issue.

Regards,
Naveen M N


reply via email to

[Prev in Thread] Current Thread [Next in Thread]