This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> is soclose being called on the socket? If so, what over bits are set > in so->so_state? soclose() needs to get > to the code after the > discard: label to set the SS_NOFDREF to true in order that sofree will > actually free the socket. Is this happening and if not why? Yes, soclose is being called. And at the label discard: it sets the SS_NOFDREF. But this is done for an other socket. It works like that: With hmiParameter->IPsocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); It allocates a socket (s1). Then the application hangs in the accept() method until an external application connect to my application. At this moment it allocates a second socket (s2). Now I close the external application and my application calls the soclose() which deallocats s1 in the manner you told me before. But s2 has never been allocated and is lost. In my opinion, s2 has to be deallocated when I'am closing the external application (before calling the close()), because it tryes to do it. But this socket (s2) has a wrong state and fails in the sofree() methode. For s2 it never calls the methode soclose(). Soclose() is called from my application code and works fine. But here, s2 was created automatically in the accept() methode when an external application connects. So it should deallocate automatically too when the connection stops, right ? Roger Arn
Attachment:
Application_close.txt
Description: Application_close.txt
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |