libsdl-org / SDL_net

A simple, cross-platform wrapper over TCP/IP sockets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debian patch: SDLNet_UDP_Bind does not behave as described

SDLBugzilla opened this issue · comments

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: unspecified
Reported for operating system, platform: Linux, Other

Comments on the original bug report:

On 2012-01-20 12:33:54 +0000, wrote:

Created attachment 792
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?

On 2012-01-20 16:56:15 +0000, Sam Lantinga wrote:

Ouch. That's a pretty nasty bug. Thanks for reporting it!

Let me think about the best thing to do here...

On 2013-06-07 02:38:03 +0000, Sam Lantinga wrote:

The patch has been applied as-is, again so we don't break existing applications.

Thanks!