Commit Graph

418 Commits

Author SHA1 Message Date
bennylp a2abae0a40 Fixed coverity warnings 2023-03-15 05:23:10 +07:00
sauwming 4680c7add7 Merge master 2023-03-14 10:24:59 +08:00
jimying b4184bb56d
Fix build with CFLAGS -Wextra warning reports (#3428) 2023-03-14 09:56:18 +08:00
sauwming 456b38700c Fixed reports classified as high impact 2023-03-03 10:53:22 +08:00
sauwming ecddafbb1d Fixed warnings (3) 2023-02-28 12:50:51 +08:00
jimying a27867898e
Misuse PJ_DECL in some function define (#3402) 2023-02-23 19:37:03 +08:00
sauwming 6dc42dfcd4 Fixed more warnings 2023-02-21 15:06:23 +08:00
sauwming 66c101f3d3
Add API to shutdown TURN session with the appropriate error status (#3392)
* Add pj_turn_session_shutdown2()

* Minor: fix indentation
2023-02-20 19:00:57 +08:00
jimying 8054a92cd5
Fix doc error (#3375) 2023-02-16 10:03:01 +08:00
sauwming bc4812d31a
Merge pull request from GHSA-cxwq-5g9x-x7fr
* Fixed heap buffer overflow when parsing STUN errcode attribute

* Also fixed uint parsing
2022-12-23 15:05:28 +08:00
Nanang Izzuddin 087832fd1a
Fix undefined-shift in STUN message check (#3313) 2022-12-22 13:55:05 +08:00
Nanang Izzuddin d8440f4d71
Merge pull request from GHSA-9pfh-r8x4-w26w
* Fix buffer overread in STUN message decoder

* Updates based on comments
2022-12-20 12:39:12 +08:00
Riza Sulistyo 5ac9104514
Expand tab to spaces and remove $Id$ (#3292) 2022-11-22 16:26:54 +07:00
sauwming 40a06fba2c Misc (re #3087): Update iOS sample app projects and fix build warnings 2022-11-01 12:02:49 +08:00
sauwming ae580f351f Misc (re #3087): Suppressed build warning on Mac 2022-11-01 11:01:45 +08:00
jimying 6f2ea3aec3
Remove valgrind warning for pjnath (points to uninitialised byte) (#3052) 2022-10-19 10:51:52 +07:00
Sébastien Blin 35b00d53ce
ice_session: fix crash if all ipv6 addresses are deprecated (#3109) 2022-10-19 10:46:28 +07:00
orbea c804b31f85
Fix build fail on alpine linux (with musl libc) : no execinfo.h (#3263)
The execinfo.h header is GNU specific and is not available with musl.

Gentoo Issue: https://bugs.gentoo.org/867343

Co-authored-by: jimying <yingqw.js@gmail.com>
2022-10-17 13:32:23 +08:00
jimying e4a8d0ad9c
Fix possible deadlock in TURN session (not release lock) (#3256) 2022-09-27 14:21:05 +07:00
sauwming 1cda935380
Only include upnpdebug.h if logging is enabled (#3213) 2022-09-19 17:37:09 +07:00
Benny Prijono c03ab41ed5
Documentation fixes for docs.pjsip.org v2.0 project (#3202)
* Improve robustness of sample apps. Fixing crash in aviplay

* Changes in documentation

* Add first pjsua2 hello world sample (from PJSUA2 guide)

* Fix doxygen documentation for docs.pjsip.org v2

* Add make clean-doc target

* Replace Trac ticket URL with GitHub issues URL

* Remove pjsip-book because the correct one is in pjproject_docs
2022-08-09 06:16:16 +07:00
sauwming 8861441ec8
Move UPnP to PJNATH (#3195) 2022-07-29 17:05:28 +08:00
Marcus Froeschl 30ca7186db
Fix compiler warning C4819 (Unicode character in ANSI file) (#3022) 2022-03-25 17:30:10 +08:00
sauwming 6f197385c7
Miscellaneous fixes (#2969)
* Suppressed various compilation warnings
* Fixed CodeQL warning
* Fixed build warning on Android and Linux
* Fix build warning on Visual Studio
* Update target Android SDK version to 29 (for pjsua2 & app), to avoid gradle error: 'Google Play requires that apps target API level 29 or higher'.
* Add support for Camera2 API to ipjsua android app.
* Fix assertion on Win32 app (MSVC2005) because ICE transport info size is 160 bytes while the allocated buffer is just 144 bytes.
* Enable python unit test on windows for github actions.
* Avoid assertion in pjsua test caused by double calling of pjsua_conf_remove_port()
2022-02-24 14:46:01 +07:00
George Joseph 668a828631
Add additional unit test options (#2961) 2022-02-11 12:28:03 +08:00
sauwming ddefd578b1
Fixed ice session assertion when there's no checklist (#2955) 2022-02-10 10:57:07 +08:00
ryancaicse bc32549bb3
Fix some resource leaks (#2928) 2021-12-27 10:05:22 +08:00
Nanang Izzuddin adb8340752 Revert "After ICE nego is completed, don't perform triggered check and ignore any completion of outgoing check."
This reverts commit 105ca1675d.
2021-12-24 15:15:42 +07:00
Nanang Izzuddin 105ca1675d After ICE nego is completed, don't perform triggered check and ignore any completion of outgoing check. 2021-12-24 15:05:35 +07:00
Nanang Izzuddin c6e238d2a3
Avoid memory bloat on ICE restart (#2903) 2021-12-15 09:05:20 +07:00
Riza Sulistyo 6ca06f63ec
Fix some doc warning (#2879) 2021-11-10 09:57:40 +07:00
Nanang Izzuddin 4b11af1d84
When nominating in regular nomination, don't nominate triggered check immediately to avoid concluding a pair with lower priority (see #2812). (#2817) 2021-09-06 15:58:35 +07:00
sauwming 328a6837cc
Resort ICE checklist upon entering nomination stage (#2806) 2021-08-30 11:45:52 +08:00
Riza Sulistyo 661a8cef67
Add support to windows on ARM build (#2807)
* Add support to ARM64 configuration for win32 build

* Add changes notes to webrtc and webrtc_aec3 third party sources

* Remove reference to libwebrtc_aec3 from libpjproject. Add reference it manually if libwebrtc_aec3 is needed.

* Fix build error on Release configuration.
2021-08-30 10:39:48 +07:00
sauwming f448fc21df
Fix socket leak in turn sock (#2805) 2021-08-25 08:46:45 +08:00
sauwming 15663e3f37
Merge pull request from GHSA-2qpg-f6wf-w984 2021-08-10 11:53:25 +08:00
Momo Takanashi 6a700a6276
Added pj_turn_sock_connect for TURN TCP Allocations (#2754) 2021-07-13 11:17:59 +07:00
sauwming f0ff5817d0
Fix double free of stun session (#2709) 2021-05-17 09:56:27 +08:00
Nanang Izzuddin 79531cbc05
More works on Trickle ICE (#2667)
- Improve trickling state management (fix no SIP INFO when initial INVITE responded immediately with 200, strayed SIP INFO after trickling is done, etc).
- Fix issues when rtcp-mux is enabled.
- Allow process incoming SIP INFO before receiving remote SDP.
- Use regular ICE on re-INVITE (with reinit media flag).
- Avoid calling pj_ice_strans_get_running_comp_cnt() for loop condition.
- Fix bug in pjnath-test: TURN server set wrong peer channel number.
- Added timer for end-of-candidate indication from remote & don't flag ice-mismatch if remote uses default address in trickle ICE
2021-03-17 13:00:01 +07:00
Nanang Izzuddin dd2827fcfe Trickle ICE (re #2588):
- Disable assertion check when a check receives double completions.
- Remote candidate count check should not be in an assertion form.
- Don't stop ICE when updating checklist failed.
2021-03-10 15:07:11 +07:00
Nanang Izzuddin 25c5eea417 Trickle ICE (re #2588):
- Fix premature end-of-candidate indication.
- Fix premature ICE session destroy in sending INFO (update remote with local candidates).
- Fix assertion when foundation list is full.
- Fix assertion when pruned check is completed/timed-out.
- Minor, missing 'static' for internal functions.
2021-03-10 10:05:45 +07:00
Nanang Izzuddin 580b0f3ef3
TLS failed to load password-protected private key from buffer (#2606)
Fix loading TLS cert from buffer with private key password-protected, adding logs in loading cert/key, updated expired TLS cert in SSL socket unit test.
2020-12-15 10:25:13 +07:00
Nanang Izzuddin d65cacddd3
Implement trickle ICE (#2588)
Squash & merge trickle-ice dev branch to master.
2020-12-11 09:40:57 +07:00
Nanang Izzuddin 2a0095175f
Supporting mingw-w64 (#2598) 2020-12-10 15:50:56 +07:00
Nanang Izzuddin f834154bd6
ICE initialization never completes due to race condition (#2525)
* Fix possible race in ICE in TURN allocation init so TURN candidate status stays PJ_EPENDING.
2020-09-29 10:14:07 +07:00
Nanang Izzuddin bd9dff4b02
Media loss after 5 minutes when using ICE+TURN (#2503)
- Assign unique local preferences for candidates with the same type.
- Update component's valid pair condition, instead of just the highest priority, also consider 'nominated' flag.
- Add new compile-time setting PJ_ICE_ST_USE_TURN_PERMANENT_PERM, if set, TURN client session will automatically renew permission for all remote candidates.
- Update local preference for peer reflexive candidate.
- Also update PRIORITY field value in performing connectivity check: use unique local pref (with peer-reflexive candidate type).
- Fix local preference mask for non-standard ICE prio calculation.
2020-08-18 13:03:44 +07:00
jrun 645611d8a9
ice_strans: add on_valid_pair() to callbacks (#2433)
Related to #2263
2020-05-20 12:16:10 +08:00
sauwming 95c29aa1d2
Avoid undefinition of standard macros s_addr and s6_addr (#2423) 2020-05-06 09:38:26 +08:00
Nanang Izzuddin b23633707c
More CI works (#2376)
* pjsua-test:
  - Update pjsua-test module call: wait ICE update before checking media
  - Attempt to fix all failed tests by sipp module: changed SIPp port from 6000 to 50070 (port used by recvfrom module)
  - Update call module: confirm codec priority after change, fix DTLS-SRTP expect may race with state CONFIRMED
  - Add timeout check in telnet-ing to pjsua
  - ICE nego may race with call state CONFIRMED, so mod call better just sleep instead of expecting 'ICE nego success'.

* Other unit tests:
  - Print stack trace on crash on Linux and DarwinOS via SIGSEGV signal handler.
  - Update resolver test: print log on callback error, replace assertion checks with error return, fix comments, sleep periods, fix received packet count may be > 1 if server ignore the request (for example when the test machine experiencing high CPU load).
  - Update ccpp.yml: add -g for jobs with unit-tests.
  - More lenient on tsx retransmission count check in pjsip-test.
  - Update tsx_uac/s_test.c: allow retransmission timing diff from 150 to 500ms to accommodate possible CPU spike on some test machines.
2020-04-30 11:25:19 +07:00
Nanang Izzuddin c3456980ba Add option to exclude benchmark tests in unit tests 2020-03-03 09:53:07 +07:00