summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsip/sip_transport_tcp.c
AgeCommit message (Collapse)Author
2014-02-04Fixed #1731: Fix TCP transport leak problemLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4725 74dad513-b988-da41-8d7b-12977e46ad98
2013-11-29Fixed #1714: Workaround for stuck in TCP/TLS shutdown when another thread is ↵Benny Prijono
destroying the transport git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4661 74dad513-b988-da41-8d7b-12977e46ad98
2013-06-19Re #1680: Add initial support for Win64Riza Sulistyo
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4537 74dad513-b988-da41-8d7b-12977e46ad98
2013-04-26Fixed #1661: Option to use SO_REUSEADDR for TCP and TLS listeners and use it ↵Benny Prijono
by default on non-Windows platforms git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4506 74dad513-b988-da41-8d7b-12977e46ad98
2013-03-27Re #1630: Prevent the update of TCP transport address if the address is zero.Liong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4451 74dad513-b988-da41-8d7b-12977e46ad98
2012-11-06Misc (re #1562): Fixed Symbian build errors on S60 5th edition SDK.Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4294 74dad513-b988-da41-8d7b-12977e46ad98
2012-10-08Fixed #1592: Multithreading issues in PJSIP (fixing pj_timer_heap_poll() and ↵Liong Sauw Ming
lock order inversion in tcp/tls transport) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4281 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-20Fixed #1585: IPv6 support for SIP TCP and TLS transports and PJSUA-LIB v2Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4262 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-18Re #1583: Removed testing scenario accidentally left in the codeLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4260 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-18Re #1583: Fixed error propagation that caused the disconnection of the transportLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4259 74dad513-b988-da41-8d7b-12977e46ad98
2012-09-18Fixed #1583: Unexpected SIP message transmission after transaction has timed-outLiong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4258 74dad513-b988-da41-8d7b-12977e46ad98
2011-05-05Re #1250: Updated the year in all copyright texts with 2011!Nanang Izzuddin
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3553 74dad513-b988-da41-8d7b-12977e46ad98
2011-03-23Re #1221: Move setting the socket option to pjlib level (sock_bsd) instead ↵Liong Sauw Ming
of in the SIP transport. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3480 74dad513-b988-da41-8d7b-12977e46ad98
2011-03-23Fixed #1221: Crash when SIP transport tried to write to a broken pipe.Liong Sauw Ming
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3478 74dad513-b988-da41-8d7b-12977e46ad98
2010-04-14Ticket #1056:Nanang Izzuddin
- Added functions to set/unset transport state notification callback on specific transport. - Updated transaction to immediately terminate the transactions when their transport gets disconnected. - Minor update: renamed function pjsip_tpmgr_set/get_status_cb() to pjsip_tpmgr_set/get_state_cb(). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3138 74dad513-b988-da41-8d7b-12977e46ad98
2010-03-30Ticket #1044:Nanang Izzuddin
- Added initial version of automatic re-registration after registration failure and automatic call disconnection after re-registration attempt fails. - Published auto re-registration setting to pjsua app. - Updated pjsip_regc_send() to retrieve the transport earlier (was only in tsx_callback()). - Fixed TCP and TLS transport to prevent transport deletion in transport disconnection callback. - Fixed wrong keep-alive settings used by TLS transport (was using TCP keep-alive settings). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3128 74dad513-b988-da41-8d7b-12977e46ad98
2010-03-10More #1032 (new SIP TCP/TLS transport callback):Benny Prijono
- PJSUA-LIB transport callback, if installed, will call the previously registered callback, to allow multiple transport callbacks to be installed - there seem to be a bug with the use of "pjsip_tp_state_callback" everywhere (the "pjsip_tp_state_callback" type is pointer, but most variables of this type are declared to pointer too) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3119 74dad513-b988-da41-8d7b-12977e46ad98
2010-02-26Minor #1032: Fixed transport TCP of missing returning PJ_FALSE when connect ↵Nanang Izzuddin
attempt failed. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3113 74dad513-b988-da41-8d7b-12977e46ad98
2010-02-25More ticket #1032:Nanang Izzuddin
- Updated transport state notification callback to return void. - Updated transport state enum to only contain connected and disconnected, no more bitmask value. - Added direction field to SIP transport. - Removed remote hostname hash from transport key. - Updated cert info dump to return -1 when buffer is insufficient. - Added new error code PJSIP_TLS_ECERTVERIF. - Updated get_cert_name() in ssl_sock_symbian.c to use heap buffer instead of stack. - Minors, e.g: added prefix PJ in cipher types, docs. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3110 74dad513-b988-da41-8d7b-12977e46ad98
2010-02-24Ticket #1032:Nanang Izzuddin
- Initial version of server domain name verification: - Updated SSL certificate info, especially identities info - Updated verification mechanism as in the specifications in ticket desc. - Added server domain name info in pjsip_tx_data. - Added alternative API for acquiring transport and creating transport of transport factory to include pjsip_tx_data param. - Server identity match criteria: - full host name match - wild card not accepted - if identity is URI, it must be SIP/SIPS URI - Initial version of transport state notifications: - Added new API to set transport state callback in PJSIP and PJSUA. - Defined states: connected/disconnected, accepted/rejected, verification errors. - Minors: - Updated SSL socket test: dump verification result, test of requiring client cert, and few minors. - Updated test cert to include subjectAltName extensions. - Added SSL certificate dump function. - Updated max number of socket async operations in Symbian sample apps (RSocketServ::Connect()) to 32 (was default 8). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3106 74dad513-b988-da41-8d7b-12977e46ad98
2009-12-22Misc (#1003): added protection against situation when pj_sock_getsockname() ↵Benny Prijono
returns PJ_SUCCESS but 0.0.0.0 is reported as the socket address, potentially causing SIP TCP transport to put 0.0.0.0 or empty Via address. Not sure if this situation could happen though. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3035 74dad513-b988-da41-8d7b-12977e46ad98
2009-10-25Initial commit for ticket #950: QoS support:Benny Prijono
- implementation: - PJLIB (sock_qos*.*) - added QoS support in: - SIP UDP transport, - SIP TCP transport, - media UDP transport (done in pjsua-lib), - pjnath ICE stream transport, - pjnath STUN socket, - pjnath TURN client - added QoS options in pjsua-lib: - QoS fields in pjsua_transport_config - added "--set-qos" parameter in pjsua Notes: - QoS in TLS transport is not yet implemented, waiting for #957 - build ok on VS6, VS2005 (multiple targets), Carbide, and Mingw - no run-time testing yet git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2966 74dad513-b988-da41-8d7b-12977e46ad98
2009-06-22Ticket #758:Nanang Izzuddin
- fixed transport TCP to call on_connect_complete when connect() returns PJ_SUCCESS. - added option to enable transport TCP in symbian_ua. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2781 74dad513-b988-da41-8d7b-12977e46ad98
2008-12-23Updated copyright notice in all files to Teluu Inc., and changed the year as ↵Benny Prijono
well git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2394 74dad513-b988-da41-8d7b-12977e46ad98
2008-08-04Changed SIP transport to use active socket to fix ticket #579: "Data loss ↵Benny Prijono
with TCP sockets (thanks Helmut Wolf for the report)". Also added SIP more TCP transport tests to reproduce the bug git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2188 74dad513-b988-da41-8d7b-12977e46ad98
2008-07-28Ticket #538: Closed TCP connection should be removed from the hash table ↵Benny Prijono
immediately git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2180 74dad513-b988-da41-8d7b-12977e46ad98
2008-07-13Ticket #564: Reduce the memory usage for default pjsip settingsBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2131 74dad513-b988-da41-8d7b-12977e46ad98
2008-06-20Large changeset to replace all occurences of year 2007 with 2008 in the ↵Benny Prijono
copyright notice git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2039 74dad513-b988-da41-8d7b-12977e46ad98
2008-02-22Ticket #491: Crash in TCP/TLS transport when the listener is destroyedBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1817 74dad513-b988-da41-8d7b-12977e46ad98
2007-12-01Ticket #421: initial IPv6 support: UDP transportBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1602 74dad513-b988-da41-8d7b-12977e46ad98
2007-11-05SIP TCP and TLS transports may call send completion callback with ↵Benny Prijono
bytes_set=0 when send operation fails because outgoing connection is cancelled (for example, application quits). This will trigger assertion error in transaction because transaction only expects positive or negative bytes_set number, but not zero git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1551 74dad513-b988-da41-8d7b-12977e46ad98
2007-10-24Fixed ticket #402: Endless error loop when TCP accept() continuously returns ↵Benny Prijono
error git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1519 74dad513-b988-da41-8d7b-12977e46ad98
2007-10-05Related to ticket #95: bug in TLS transport: keep-alive timer is not ↵Benny Prijono
cancelled when transport is destroyed git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1476 74dad513-b988-da41-8d7b-12977e46ad98
2007-10-04Ticket #95: Keep-alive mechanism for TCP and TLS transportsBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1473 74dad513-b988-da41-8d7b-12977e46ad98
2007-07-20Ticket #354: build PJLIB as dynamic libraries (.DSO) in SymbianBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1405 74dad513-b988-da41-8d7b-12977e46ad98
2007-05-12Symbian fixes to compile on GCCE (nested callbacks etc)Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1269 74dad513-b988-da41-8d7b-12977e46ad98
2007-05-02Ported PJSIP and PJSIP-SIMPLE to SymbianBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1241 74dad513-b988-da41-8d7b-12977e46ad98
2007-04-06Fixed ticket #216: Build error when PJ_HAS_TCP is set to zero (thanks ChenHuan)Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1159 74dad513-b988-da41-8d7b-12977e46ad98
2007-03-18Changed pj_sockaddr structure and added pjnath project for ICE/STUN stuffsBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1080 74dad513-b988-da41-8d7b-12977e46ad98
2007-02-19Ticket #110: HUGE HUGE changeset to replace all occurence of year 2006 with ↵Benny Prijono
2007 in copyright notice in all sources git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@974 74dad513-b988-da41-8d7b-12977e46ad98
2006-12-26Fixed ticket #42: duplicate hash entry when TCP/TLS connection is created ↵Benny Prijono
while previous one is shutting down git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@866 74dad513-b988-da41-8d7b-12977e46ad98
2006-11-19Fixed minor memory leak in SIP TCP transportBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@808 74dad513-b988-da41-8d7b-12977e46ad98
2006-09-26Added support for specifying IP address in PJSUA-LIB/pjsua.Benny Prijono
This option can be used for example to select the IP interface of SIP/RTP/RTCP transports, or to specify the public IP address of NAT/router in case port forwarding is used. For SIP transports, this feature works for both UDP and TCP transports. Changes: - added public_ip field in pjsua_transport_config, and change SIP and media transport creation to consider this option. - added --ip-addr option in pjsua - added pjsip_tcp_transport_start2() which allows specifying alternate TCP published address when creating TCP transports. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@742 74dad513-b988-da41-8d7b-12977e46ad98
2006-09-14Fix the local IP address resolution issue in PJSIP, PJMEDIA, and PJSUA, by ↵Benny Prijono
adding a new API pj_gethostip() to resolve the default local IP address of local host. This new function will work even when local hostname resolution is not set correctly, by detecting the default IP interface in the system. Also fix compile warnings in iLBC. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@721 74dad513-b988-da41-8d7b-12977e46ad98
2006-07-29Another take at fixing 64bit problems. PJ_MAX_OBJ_NAME is increased to 32 ↵Benny Prijono
chars (from 16), and check all those sprintf's especially the ones with "%p" format. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@635 74dad513-b988-da41-8d7b-12977e46ad98
2006-07-18Fixed several bugs related to TCP:Benny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@610 74dad513-b988-da41-8d7b-12977e46ad98
2006-07-16Fixed crash in SIP TCP transport deinitialization, and set pjsip-perf to ↵Benny Prijono
handle INVITE request to non-standard URL call-statefully git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@605 74dad513-b988-da41-8d7b-12977e46ad98
2006-07-10Fixed several bugs with TCP transport: (1) Handle crash in transaction, ↵Benny Prijono
possibly because of transport error, (2) TCP accept() does not work correctly with IOCP because IOCP needs different buffer each time WSAAcceptEx() is called, (3) increase verbosity to warning on transport related errors in transaction git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@600 74dad513-b988-da41-8d7b-12977e46ad98
2006-07-03Change all pj_memset to pj_bzero(), where applicableBenny Prijono
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@582 74dad513-b988-da41-8d7b-12977e46ad98
2006-06-28Major improvements in PJSIP to support TCP. The changes fall into these ↵Benny Prijono
categories: (1) the TCP transport implementation itself (*.[hc]), (2) bug-fix in SIP transaction when using reliable transports, (3) support for TCP transport in PJSUA-LIB/PJSUA, and (4) changes in PJSIP-TEST to support TCP testing. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@563 74dad513-b988-da41-8d7b-12977e46ad98