[Bug 710078] rtspserver test: "racy" behavior in get_unused_port function

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Oct 14 19:57:28 CEST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=710078
  GStreamer | gst-rtsp-server | unspecified

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #257231|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2013-10-14 17:57:25 UTC ---
Review of attachment 257231:
 --> (https://bugzilla.gnome.org/review?bug=710078&attachment=257231)

Generally looks fine to me but:

::: gst/rtsp-server/rtsp-server.c
@@ +853,3 @@
+
+        if (g_socket_address_to_native (sockaddr, &native_addr, sizeof
native_addr, &addr_error)) {
+          addr_len = sizeof native_addr;

Please add some () for the sizeof :)

@@ +857,3 @@
+
+          if (getsockname (sock, (struct sockaddr *) &native_addr, &addr_len)
== 0) {
+            port = ntohs (native_addr.sin_port);

Use g_ntohs() and don't include netinet/in.h

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list