]> sjero.net Git - linphone/commitdiff
ignore tunnel transmissions errors (usually when not ready) for SIP
authorSimon Morlat <simon.morlat@linphone.org>
Tue, 26 Jun 2012 11:11:07 +0000 (13:11 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Tue, 26 Jun 2012 11:12:01 +0000 (13:12 +0200)
coreapi/TunnelManager.cc

index 44d12251cc06d392ebcef0ebade6596d1aade5a2..e3c7e659578329ba380543904f1c8cce75b1702b 100644 (file)
@@ -31,15 +31,16 @@ Mutex TunnelManager::sMutex;
 
 int TunnelManager::eXosipSendto(int fd,const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen,void* userdata){
        TunnelManager* lTunnelMgr=(TunnelManager*)userdata;
-       int err;
+       
        sMutex.lock();
        if (lTunnelMgr->mSipSocket==NULL){
                sMutex.unlock();
-               return len;//let ignore the error
+               return len;
        }
-       err=lTunnelMgr->mSipSocket->sendto(buf,len,to,tolen);
+       lTunnelMgr->mSipSocket->sendto(buf,len,to,tolen);
        sMutex.unlock();
-       return err;
+       //ignore the error in all cases, retransmissions might be successful.
+       return len;
 }
 
 int TunnelManager::eXosipRecvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen,void* userdata){