/[resiprocate]/main/resip/stack/TcpBaseTransport.cxx
ViewVC logotype

Diff of /main/resip/stack/TcpBaseTransport.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11234 by dpocock, Fri Sep 5 20:21:59 2014 UTC revision 11235 by dpocock, Mon Sep 15 17:20:11 2014 UTC
# Line 3  Line 3 
3  #endif  #endif
4    
5  #include <memory>  #include <memory>
6    #include "rutil/compat.hxx"
7  #include "rutil/Socket.hxx"  #include "rutil/Socket.hxx"
8  #include "rutil/Data.hxx"  #include "rutil/Data.hxx"
9  #include "rutil/DnsUtil.hxx"  #include "rutil/DnsUtil.hxx"
# Line 172  Line 173 
173           }           }
174           return -1;           return -1;
175        }        }
176          if(!configureConnectedSocket(sock))
177          {
178             throw Exception("Failed to configure connected socket", __FILE__,__LINE__);
179          }
180        makeSocketNonBlocking(sock);        makeSocketNonBlocking(sock);
181    
182        DebugLog (<< this << " Received TCP connection from: " << tuple << " mTuple: " << mTuple << " as fd=" << sock);        DebugLog (<< this << " Received TCP connection from: " << tuple << " mTuple: " << mTuple << " as fd=" << sock);
# Line 248  Line 253 
253        failSubCode = errno;        failSubCode = errno;
254        return NULL;        return NULL;
255     }     }
256  #ifdef TARGET_OS_IPHONE     if(!configureConnectedSocket(sock))
    int on = 1;  
    if ( ::setsockopt ( sock, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) )  
257     {     {
258        int e = getErrno();        throw Exception("Failed to configure connected socket", __FILE__,__LINE__);
       WarningLog (<< "Couldn't set sockoption SO_NOSIGPIPE: " << strerror(e));  
       error(e);  
       throw Exception("Failed setsockopt", __FILE__,__LINE__);  
259     }     }
 #endif  
260     makeSocketNonBlocking(sock);     makeSocketNonBlocking(sock);
261     if (mSocketFunc)     if (mSocketFunc)
262     {     {

Legend:
Removed from v.11234  
changed lines
  Added in v.11235

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27