View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000011Ecere SDKecerepublic2008-04-08 15:262012-03-29 07:53
Assigned Tojerome 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000011: recvfrom is not used for UDP socket because DatagramHost sets _connected to 1
DescriptionProbably in fixing a memory leak, the following piece of code was added to

            disconnectCode = (DisconnectCode)-1;
            _connected = 1;

The use of _connected should be reviewed for UDP sockets.
TagsNo tags attached.
Attached Files

- Relationships
child of 0000433closed previously resolved issues (draft 1 of 0.44 and earlier) 

-  Notes
ipluss (developer)
2008-04-09 05:42

because i can not understand that whole Socket file,
for fix a memory leak bug, so assign 1 to _connected
before we can know to resolve this question ,
the simplest way to fix this bug is
change if(type == tcp )|| _connected)
to if(type == tcp )//|| _connected)

jerome (administrator)
2008-05-13 20:02

- ipluss, your suggestion of always calling recvfrom for UDP sockets might be better, as it seems multiple different clients could be sending through the same hosting UDP socket. This would also mean that the buffering code built in Socket would not work and that UDP sockets should always ensure to process all the bytes coming in (returning "count" from OnReceive).
- An "inetPort" property has been added, functioning much like the already existing "inetAddress" property. Both inetPort and inetAddress are now reset after each recvFrom. Set properties were not added however, these should rather be set for UDP sockets by calling DatagramConnect which sets these. To be verified.

- Issue History
Date Modified Username Field Change
2008-04-08 15:26 jerome New Issue
2008-04-09 05:42 ipluss Note Added: 0000007
2008-04-30 20:03 jerome Status new => assigned
2008-04-30 20:03 jerome Assigned To => jerome
2008-05-02 01:05 jerome Priority normal => high
2008-05-13 20:02 jerome Note Added: 0000043
2008-05-13 20:13 jerome Status assigned => resolved
2008-05-13 20:13 jerome Resolution open => fixed
2008-05-13 20:28 jerome Reporter jerome => ipluss
2009-05-03 03:43 jerome Status resolved => closed
2010-07-25 21:58 redj Relationship added child of 0000433
2012-03-29 07:53 redj Category => Ecere Runtime Library
2012-03-29 07:53 redj Project @1@ => Ecere SDK

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker