[xiph-commits] r11554 - icecast/trunk/libshout/src

brendan at svn.xiph.org brendan at svn.xiph.org
Fri Jun 9 16:09:43 PDT 2006


Author: brendan
Date: 2006-06-09 16:09:33 -0700 (Fri, 09 Jun 2006)
New Revision: 11554

Modified:
   icecast/trunk/libshout/src/shout.c
Log:
shout_open was failing unnecessarily in the connect_pending
state. From Karl Heyes.


Modified: icecast/trunk/libshout/src/shout.c
===================================================================
--- icecast/trunk/libshout/src/shout.c	2006-06-09 22:59:40 UTC (rev 11553)
+++ icecast/trunk/libshout/src/shout.c	2006-06-09 23:09:33 UTC (rev 11554)
@@ -950,12 +950,11 @@
 	case SHOUT_STATE_CONNECT_PENDING:
 		if (shout_get_nonblocking(self)) {
 			if ((rc = sock_connected(self->socket, 0)) < 1) {
-				if (!rc)
-					return SHOUTERR_BUSY;
-				else {
+				if (rc == SOCK_ERROR) {
                                         rc = SHOUTERR_SOCKET;
                                         goto failure;
-                                }
+				} else
+					return SHOUTERR_BUSY;
 			}
 			if ((rc = create_request(self)) != SHOUTERR_SUCCESS)
                                 goto failure;



More information about the commits mailing list