[Pkg-telepathy-commits] [SCM] libjingle0.3 packaging branch, debian-lenny-patches, updated. 9ebee35c7f7cff456c26f6b0fa98f93f4e9d0afc

Simon McVittie smcv at debian.org
Fri Dec 26 23:35:33 UTC 2008


The following commit has been merged in the debian-lenny-patches branch:
commit a37709d486ffe74079b36198cff6781db3fbdb3b
Author: Simon McVittie <smcv at debian.org>
Date:   Fri Dec 26 22:37:37 2008 +0000

    01_tcp_wouldblock.patch, so that sending on a TCP socket returns an error if it's not writable

diff --git a/talk/p2p/base/tcpport.cc b/talk/p2p/base/tcpport.cc
index da93a28..2874a30 100644
--- a/talk/p2p/base/tcpport.cc
+++ b/talk/p2p/base/tcpport.cc
@@ -212,7 +212,10 @@ TCPConnection::~TCPConnection() {
 
 int TCPConnection::Send(const void* data, size_t size) {
   if (write_state() != STATE_WRITABLE)
-    return 0;
+  {
+    error_ = EWOULDBLOCK;
+    return SOCKET_ERROR;
+  }
 
   int sent = socket_->Send(data, size);
   if (sent < 0) {

-- 
libjingle0.3 packaging



More information about the Pkg-telepathy-commits mailing list