Fix bug #33664: allow for transport providers with protocol == 0
authorSteve Hay <SteveHay@planit.com>
Mon, 18 Apr 2005 16:04:20 +0000 (16:04 +0000)
committerSteve Hay <SteveHay@planit.com>
Mon, 18 Apr 2005 16:04:20 +0000 (16:04 +0000)
(This indicates that any protocol may be used, so don't bother checking
that the requested protocol matches in this case.)

p4raw-id: //depot/perl@24242

win32/win32sck.c

index 6b3d354..051b442 100644 (file)
@@ -426,7 +426,8 @@ open_ifs_socket(int af, int type, int protocol)
 
                 if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily)
                     || (type != proto_buffers[i].iSocketType)
-                    || (protocol != 0 && protocol != proto_buffers[i].iProtocol))
+                    || (protocol != 0 && proto_buffers[i].iProtocol != 0 &&
+                        protocol != proto_buffers[i].iProtocol))
                     continue;
 
                 if ((proto_buffers[i].dwServiceFlags1 & XP1_IFS_HANDLES) == 0)