summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:03:19 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:03:19 +0000
commit7ad4ae13e8d6fa5920868bb7b91e5e68198c0f6c (patch)
treeb152f6a9f24a5fee00b80c213619b2bd6c89f774 /gcc/ada/g-socket.adb
parent64d783d08d0a7e431287dfc3ed6ff2661d352cb0 (diff)
downloadgcc-7ad4ae13e8d6fa5920868bb7b91e5e68198c0f6c.tar.gz
2013-04-12 Robert Dewar <dewar@adacore.com>
* sem.ads, opt.ads: Minor comment edits. * sem_warn.adb, sem_ch6.adb: Minor reformatting. 2013-04-12 Claire Dross <dross@adacore.com> * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate, Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed, not suitable for formal analysis. 2013-04-12 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Abstract_State): Use Defining entity to locate package entity, which may be a child unit. 2013-04-12 Thomas Quinot <quinot@adacore.com> * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If the specified timeout is 0, do not attempt to determine whether the connection succeeded. 2013-04-12 Doug Rupp <rupp@adacore.com> * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 7f9f34d992c..8079e80b0bd 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -516,10 +516,6 @@ package body GNAT.Sockets is
(Selector, R_Socket_Set, W_Socket_Set, E_Socket_Set, Status, Timeout);
end Check_Selector;
- --------------------
- -- Check_Selector --
- --------------------
-
procedure Check_Selector
(Selector : Selector_Type;
R_Socket_Set : in out Socket_Set_Type;
@@ -739,12 +735,17 @@ package body GNAT.Sockets is
-- Wait for socket to become available for writing
- Wait_On_Socket
- (Socket => Socket,
- For_Read => False,
- Timeout => Timeout,
- Selector => Selector,
- Status => Status);
+ if Timeout = 0.0 then
+ Status := Expired;
+
+ else
+ Wait_On_Socket
+ (Socket => Socket,
+ For_Read => False,
+ Timeout => Timeout,
+ Selector => Selector,
+ Status => Status);
+ end if;
-- Check error condition (the asynchronous connect may have terminated
-- with an error, e.g. ECONNREFUSED) if select(2) completed.