Hi,

I found and fixed a small bug in "crypto\bio\b_sock.c" and want to ask
where to post the patch / fix.

please note:
I can not guarantee of production grade quality of my fix, but it works
pretty well with my implementation of an FTP server.

regards,
Maik,
the modem-man


B.T.W.: what is preferred diff format here? I used "diff -bw -u". Okay?


--- 1.0.0\b_sock.c      Thu Jan 07 14:15:40 2010
+++ 1.0.0.patchw32asteriskhost\b_sock.c Fri Apr 09 21:02:18 2010
@@ -672,7 +672,21 @@
 #endif
                        }
                else if (h[0]=='*' && h[1]=='\0')
+         {
+#     ifdef _WIN32 /* modem-man patch, sure for windows. not sure for other OS 
*/
+                       /* h="0.0.0.0"; */ /* quick hack, but dirty! */
+                       hint.ai_flags |= AI_PASSIVE;  /* better way of '*' 
handling! */
+#     else /* modem-man patch */
                        h=NULL;
+#     endif /* modem-man patch */
+         }
+               }
+       if (p && (p[0]=='*' && p[1]=='\0'))
+               {
+#     ifdef _WIN32 /* modem-man patch */
+                       p="0"; /* ephemeral port number */
+                       hint.ai_flags |= AI_PASSIVE;  /* better way of '*' 
handling! */
+#     endif /* modem-man patch */
                }
 
        if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;

Reply via email to