We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1389

Summary: Debian patch: SDLNet_UDP_Bind does not behave as described
Product: SDL_net Reporter: manuel.montezelo
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: Other   
OS: Linux   
Attachments: UDP_Bind.patch

Description manuel.montezelo 2012-01-20 12:33:54 UTC
Created attachment 792 [details]
UDP_Bind.patch

Debian contains the following patch since 2003.  I don't know if it's been reported to upstream (it claims so) and I am doing it now in the case that it's useful.

http://bugs.debian.org/211570

   The comment, which is the same as in the header file, describes one behaviour.

   The code implements another: if channel is -1, it binds to the first channel
   that has not yet been bound to the maximum number of addresses. The if
   (binding->numbound... line should be just if ( binding->numbound) {
   (i.e. choose an unused channel). (Although this may break any apps using the
   incorrect behaviour.)

   Debian changelog:
   * Changed comment for SDLNet_UDP_Bind to reflect implementation
     - Since upstream has not responded to this (and seems dead), and a fair
       number of packages use sdl-net, I don't want to change the behavior
       just for debian, only properly document the actual behavior.


Can you please comment?
Comment 1 Sam Lantinga 2012-01-20 16:56:15 UTC
Ouch.  That's a pretty nasty bug.  Thanks for reporting it!

Let me think about the best thing to do here...
Comment 2 Sam Lantinga 2013-06-07 02:38:03 UTC
The patch has been applied as-is, again so we don't break existing applications.

Thanks!