|
From: Lex S. <lex...@us...> - 2002-05-05 12:29:58
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin
In directory usw-pr-cvs1:/tmp/cvs-serv9675
Modified Files:
sqUnixSocket.c
Log Message:
redo signalling of CONN_NOTIFY. Now CONN_NOTIFY is turned
on in (and only in) sqSocketConnectionStatus.
Index: sqUnixSocket.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqUnixSocket.c 1 May 2002 04:24:33 -0000 1.3
--- sqUnixSocket.c 5 May 2002 12:29:55 -0000 1.4
***************
*** 516,520 ****
if(s_errno != 0) {
/* connection failure */
- pss->pendingEvents |= CONN_NOTIFY;
pss->sockError = s_errno;
pss->sockState = Unconnected;
--- 516,519 ----
***************
*** 668,678 ****
/* return the state of a socket */
-
int sqSocketConnectionStatus(SocketPtr s)
{
if (!socketValid(s))
return -1;
!
! return SOCKETSTATE(s);
}
--- 667,682 ----
/* return the state of a socket */
int sqSocketConnectionStatus(SocketPtr s)
{
+ int state;
+
if (!socketValid(s))
return -1;
!
! state= SOCKETSTATE(s);
! if(state == WaitingForConnection)
! PSP(s)->pendingEvents|= CONN_NOTIFY;
!
! return state;
}
***************
*** 753,757 ****
/* connection completed synchronously */
SOCKETSTATE(s)= Connected;
- notify(PSP(s), CONN_NOTIFY);
}
else
--- 757,760 ----
***************
*** 761,765 ****
/* asynchronous connection in progress */
SOCKETSTATE(s)= WaitingForConnection;
- PSP(s)->pendingEvents|= CONN_NOTIFY;
aioHandle(SOCKET(s), connectHandler, PSP(s), AIO_WR); /* => connect() done */
--- 764,767 ----
***************
*** 771,779 ****
SOCKETSTATE(s)= Unconnected;
SOCKETERROR(s)= errno;
- notify(PSP(s), CONN_NOTIFY);
}
}
}
- /* notify(PSP(s), 0); */
}
--- 773,779 ----
|