summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socthi-mingw.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 09:46:58 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 09:46:58 +0000
commitfe06d16453b0bbfd20dd4a22a2f1fe1fa272f719 (patch)
tree031b105a506cd40144e4838414a751612ee5064e /gcc/ada/g-socthi-mingw.adb
parent1bb5dde3343f47865cf7dbb8fe60c6b3ea5e3992 (diff)
downloadgcc-fe06d16453b0bbfd20dd4a22a2f1fe1fa272f719.tar.gz
2010-06-22 Vincent Celier <celier@adacore.com>
* prj-attr.adb: Remove project level attribute Main_Language. 2010-06-22 Robert Dewar <dewar@adacore.com> * switch-b.adb, osint-b.adb: Minor reformatting. 2010-06-22 Pascal Obry <obry@adacore.com> * g-socthi-mingw.adb (C_Sendmsg): Do not attempt to send data from a vector if previous send was not fully successful. If only part of the vector data was sent, we exit the loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi-mingw.adb')
-rw-r--r--gcc/ada/g-socthi-mingw.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb
index 42ccb3ded09..727a69ddba9 100644
--- a/gcc/ada/g-socthi-mingw.adb
+++ b/gcc/ada/g-socthi-mingw.adb
@@ -505,6 +505,10 @@ package body GNAT.Sockets.Thin is
else
Count := Count + Res;
end if;
+
+ -- Exit now if the buffer is not fully transmitted
+
+ exit when Stream_Element_Count (Res) < Iovec (J).Length;
end loop;
return System.CRTL.ssize_t (Count);