[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 494145066f5be5a029cab6a63d74d9cb3788d4ee
Author: Simon McVittie <smcv at debian.org>
Date:   Fri Dec 26 22:36:54 2008 +0000

    01_send_assert.patch, to avoid crash when send() returns 0 (from 0.3.11-1)

diff --git a/talk/p2p/base/p2psocket.cc b/talk/p2p/base/p2psocket.cc
index d2cd1ec..603cd11 100644
--- a/talk/p2p/base/p2psocket.cc
+++ b/talk/p2p/base/p2psocket.cc
@@ -477,8 +477,12 @@ int P2PSocket::Send(const char *data, size_t len) {
   }
   int sent = best_connection_->Send(data, len);
   if (sent <= 0) {
-    assert(sent < 0);
     error_ = best_connection_->GetError();
+
+    if (error_ == EWOULDBLOCK) {
+      // This means the best_connection_ is not writable, let's resort
+      RequestSort();
+    }
   }
   return sent;
 }

-- 
libjingle0.3 packaging



More information about the Pkg-telepathy-commits mailing list