summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 18:00:42 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 18:00:42 +0000
commit0ade5f7f918c1e3e7442ef8574c3d67dd4bab4a4 (patch)
treef6767151ab9a798d0eddba4c931af96431abf232 /gcc/ada/g-socket.adb
parent5d74c8d5e46805aaec1e398c1b9097b20bf98698 (diff)
downloadgcc-0ade5f7f918c1e3e7442ef8574c3d67dd4bab4a4.tar.gz
2006-10-31 Thomas Quinot <quinot@adacore.com>
* g-socket.ads, g-socket.adb (Close_Selector): Once the signalling sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components to No_Socket. (Selector_Type): Add default value of No_Socket for R_Sig_Socket and W_Sig_Socket. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index f3ebfa36c8f..01765a70715 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2005, AdaCore --
+-- Copyright (C) 2001-2006, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -560,6 +560,12 @@ package body GNAT.Sockets is
when Socket_Error =>
null;
end;
+
+ -- Reset R_Sig_Socket and W_Sig_Socket to No_Socket to ensure that any
+ -- (errneous) subsequent attempt to use this selector properly fails.
+
+ Selector.R_Sig_Socket := No_Socket;
+ Selector.W_Sig_Socket := No_Socket;
end Close_Selector;
------------------