Commit Graph

15073 Commits

Author SHA1 Message Date
c2c7315eb2 build: fix some warnings
Change-Id: Ie4a5d67ded80c4f8b138cbac30c4694e7ba99a23
2021-05-19 12:57:37 -04:00
cd487b0726 ip_utils: fix warning
Change-Id: Ida774d4151ce0d8207c8669d7f136dfaed006955
2021-05-19 12:03:13 -04:00
e6894ceac4 msgpack: use C++17
Change-Id: I827b5a2f8513bdb9cedbc61936f0891134d47e34
2021-05-19 10:14:36 -04:00
d6e9bb8423 configure: use -Og in debug mode
Change-Id: I29522f23419b2a3bb29265a73e8f2bcfcd2548f8
2021-05-19 10:14:36 -04:00
ef23ce0c3a multiplexed_socket: use shared_ptr for ChannelInfo
This fix a potential crash into waitForData where the channel is deleted
after the check and before locking. Also notify when deleting. Also
add isDestroying on channel to avoid to wait indefinitely on destroyed channel

GitLab: #549
Change-Id: Ib37c4bab31def4ca6f594fc1338a018138217765
2021-05-18 11:29:15 -04:00
602f0a680b sipcall: add validation for isAudio/isVideoMuted APIs
Change-Id: Id42a16dfd280f835dedc3c007883f1b441d2e9ad
Gitlab: #445
2021-05-17 17:36:14 -04:00
e3c5a978fe jamiaccount: no more calls through dht
Gitlab: #543

Change-Id: I9fcb458e1f3a6fcc1a9d2daad11cdee8a3737d05
2021-05-17 16:35:55 -04:00
ca04906942 contrib: remove lzma from minizip
Change-Id: I150190c6ee544be49c20f836965e9d2bf5cc70da
2021-05-17 15:03:21 -04:00
0ca5b4d1bd sipcall: fix isAudio/isVideoMuted
Gitlab: #445

Change-Id: If1262e4f5ef8f11d6cd95a888b4219425d45614d
2021-05-17 13:55:20 -04:00
c236c3d71e fix: MacOS < 10.15 does not support filesystem functions
Change-Id: Ia116cb9315be18fd5ff54c1777b38fc20849ad06
2021-05-17 10:28:57 -04:00
ea8a3b3b10 scheduled_executor: Fix deadlock
If the scheduler's has a job that owns the last reference to the scheduler
itself, then the thread will try to join itself in the destructor of the
scheduler, resulting in `std::terminate()`.  Thus, detach the thread if the
scheduler is freed from its thread, because nobody is supposed to have a
reference to the thread.

This introduces a read after free of `running_`.  By making it a shared value,
the thread can keep a reference after destruction of the scheduler.

Gitlab: #545
Change-Id: I0118c99a5718d302f916099e24606add444546d8
2021-05-17 09:45:12 -04:00
f42ef06b58 Dockefile_ubuntu_20.04: Create docker file
There are mismatches between versions of lcov/gcov/gcc on Ubuntu 18.04.  Thus,
using Ubuntu 20.04.

GitLab: #1187
Change-Id: I8809cd944f90c94092241368405eac4cd5c51e8f
2021-05-17 08:55:23 -04:00
3e95ff89e7 docker: add lcov and gcovr for coverage
Change-Id: Idce21d6fbaf62fed9859fe023a4f75744ec29706
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1187
2021-05-14 12:11:38 -04:00
9d18629ef9 Makefile.am: Add XML/JSON coverage outputs
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1187
Signed-off-by: Olivier Dion <olivier.dion@savoirfairelinux.com>
Change-Id: Ia75aa07a4adfb4ef434db6191d9b73190e47e7e6
2021-05-14 12:11:38 -04:00
5a49e96b99 contrib: fix libargon2 build from contrib on linux
Change-Id: I782e7600747d320bb6793de1120f96d568cb9cde
2021-05-14 10:31:09 -04:00
ff625b27a9 call: hangup subcalls if a peer decline a call
Due to 6f81927c70 PJSIP_SC_BUSY_HERE is sent
instead of PJSIP_SC_DECLINE. This means that the signal received must be
taken into account for closing other subcalls on a multi-device context.

Change-Id: Iad36d2a5b07eb75d89a31a5476c6aa5ddeec2ced
GitLab: #547
2021-05-14 10:09:05 -04:00
5e69af154d unitTest/call: Increase wait time for accounts announcement
Also add missing newline at end of file.

Gitlab: #545
Change-Id: Ie96ff446d27d40f63fb6f4471b10006bcfba5d46
2021-05-14 08:56:23 -04:00
252f1b005b unitTest/scheduler: Increase timeout
2 seconds is too short on some system to spawn 1024 threads.  Increase this by a
second.  This is highly system dependent and we might want to change the logic
of the test instead.

Gitlab: #545
Change-Id: Id939ad4809e47a2cdce19885387464289110e137
2021-05-14 08:56:23 -04:00
8c8efa4f6d testVideo_input: Call DRing::fini
If not called, other threads might read memories freed by the exit handlers of
the main thread, resulting in a race condition that can cause a segmentation
fault.

Gitlab: #545
Change-Id: I29ec4c1ffee96b6a083e36f31cd738daf622315d
2021-05-14 08:56:23 -04:00
ad8a1f85fd test_media_filter: Make it compile again
There's no implicit conversion from `rational` to `int` for the bitrate
parameters.

Gitlab: #545
Change-Id: Ic8fac9633c05f458992ee7e16cd39cdd16cfb365
2021-05-14 08:49:49 -04:00
36c8db5d0f test/unitTest/Makefile.am: Remove ut_channel
See commit a760dd17ce

Gitlab: #545
Change-Id: I46c5f0ee2cff9cc98c5611747ae7f1d6893aace5
2021-05-14 08:49:47 -04:00
ffa12c740b multiplexed_socket: add ping/pong logic
Detecting that a socket is down via a keep alive can take time, moreover
if a relay is used, because the keep alive can continue to work even if the
connection is half closed.
In this patch, we add a mechanism where a beacon is sent over the multiplexed
socket to know if the peer can answer. This message can be used to detect
if a socket is usable and is sent whenever the user starts a call or that
a connectivityChanged() occurs.
Moreover, the multiplexedsocket can now sends a version to enable features
and if a bad packet on the control socket comes, the socket is not stopped.

GitLab: #542
Change-Id: Ia66d8d7f9b66bba02927f4ea41c21ef27089bceb
2021-05-13 18:11:02 -04:00
c9e467cc94 contrib(win32): add flag to update __cplusplus macro in msvc
Change-Id: Id259c9f57b4ae2a85a15c353b32afc290533800b
2021-05-13 18:11:02 -04:00
f5eb0b47df call: Add getCallDuration() method
If `duration_start_` is `time_point::min`, then when calculating the call's
duration, there's an signed integer overflow which result in an enormous time
duration.

Signed-off-by: Olivier Dion <olivier.dion@savoirfairelinux.com>
Change-Id: I3ad119ab0f79ef8e9c537d1879d628a29ceed4d7
2021-05-13 17:33:52 -04:00
dc25cb3ea4 unitTest/fileTransfer: Fix buffer overflows
Wrong constructor was used, resulting in buffer overflows.  Although it's benign
because of read only of a data section, ASAN doesn't like it at all.

Also added missing newline at end of file.

Signed-off-by: Olivier Dion <olivier.dion@savoirfairelinux.com>
Change-Id: I15553855ea368ec00456db80abb065599adc0d49
2021-05-13 17:30:46 -04:00
fa5f747caf libarchive: update to 3.5.1, disable shared library build
Change-Id: Iccc56885051aff97779ada4b5e3dec7a5f3856b7
2021-05-12 15:32:29 -04:00
60e44383ef echo-cancel: fix compilation warnings
Change-Id: I9584598f74faff61f61613985ac5b6dbb9a4c194
2021-05-12 09:15:17 -04:00
c71db26718 misc: remove unnecessary --build for libgit2 and check recent openDHT version
Change-Id: Ic6f2cd3e0b0cf839dc602231ad4b0a4914968b2e
2021-05-11 16:44:37 -04:00
b1ab54fcdc contrib: update nettle
Change-Id: I40a6ced6f725537d77643d67bf48c0cb8b9d9681
2021-05-11 14:29:09 -04:00
77227b9b36 contrib: update vpx to v1.10.0
Change-Id: I38758678eb3af510307850ab03f7eb66ae448432
2021-05-11 14:03:58 -04:00
f14ed2e966 contrib: update argon2
Change-Id: I7394d8bbbd58f040aa243a6d413de18c4504bf0e
2021-05-10 18:10:10 -05:00
eea1798779 sipcall: fix printing media attribute, cleanup
Change-Id: Id09c6d0a6791a62d4a3be0e664c0bacecb80eaa8
2021-05-10 14:41:57 -04:00
de94176707 fileutils: make sure that the directories can be fully removed on Windows
Gitlab: #538

Change-Id: I8013d61ae1f3f543f44a8ba83230f2f80f60fdfc
2021-05-07 16:10:28 -04:00
ff86e467b8 multi-stream: fix audio-only reported info
Gitlab: #445

Change-Id: Ib7d8c9070ba17414f8c4b48c3d53f72dd871c428
2021-05-07 10:15:33 -04:00
992345ed57 audio resampler: check AudioFrame inner pointer
Check AudioFrame pointer before using it to avoid segfault.
AudioFrame instances with null inner pointer was observed at
least with unit tests.

Gitlab: #541

Change-Id: I1e459590b9c247be3b6137bf8645f604ecbbe45c
2021-05-06 18:05:06 -04:00
5ab97dffbd misc: remove ring from variable's names
Change-Id: Iead6fb50bc59a7c419ea45303f58afbe48845730
2021-05-06 08:59:59 -04:00
bac6a6e981 multi-stream: report an incoming call with a media list
Currently, an incoming call is always assumed to have either audio
and video media or only audio media.
This assumption was removed and the incoming call are reported with
the list of included media with some of their attributes as found in
the call invite (SDP). This will allow to process calls with an
arbitrary number of media.
It will also allow to add new media to a call by requesting a media
change using a SIP re-invite (with new SDP). For instance, add video
to an audio-only call. The peer will receive the new offer and may
choose to accept or not the new media.
Not all media change requests require validation from the user/client.
Meaning that for instance, if a new SDP (media change request) is
received to notify that the peer muted it's audio, the media change
request can be processed without requiring validation from the
user/client.

Gitlab: #445

Change-Id: Ibc2b2501a3ec7e2c22f4e9d47cec3eda3dd43fef
2021-05-05 14:32:01 -04:00
77bac126e7 stringutils: string_view constructor adaptation for msvc compiler
Change-Id: If9f987af510e3d212710957d5678e0539ffa0ea4
2021-05-05 12:20:42 -04:00
1261c0390c opensl: reverse init condition
Change-Id: If194ae1f58e2d7ffb14862135a420054d9268e76
2021-05-05 09:57:14 -04:00
060b1fc6ca ice_transport: trim only if the limit is reached per components
PJ_ICE_ST_MAX_CAND is a limit PER components, not for the whole
list

Change-Id: I51252b01170bbf5274a3e5c2d079fe37fed25fff
GitLab: #539
2021-05-04 18:40:21 -04:00
0f491796ba getIceOptions: cleanup
Change-Id: Ibc4a5181ef33e4f09beeaa0ecbe09cf9db4e9996
2021-05-04 16:17:16 -04:00
ab8af57625 archive: use string_view to match filename
Change-Id: Idd489fcb185966fe421b6d544f4a131230ce35ca
2021-05-04 13:38:50 -04:00
7dd8826ce9 plugins: use minizip instead of libarchive
GitLab: #525
Change-Id: I7de174626bbb97c40ac58ceea9d99d9fe8b95bd9
2021-05-04 10:26:01 -04:00
451854b207 jamiaccount: make getIceOptions async and resolve ips
storeActiveIpAddress is done for each connectivityChange(), but
this logic is incorrect, because the ISP can change the IP of the
router without any connectivityChange(). This means that if no
connectivityChange() the address in the candidates will be incorrect
if the public ip is changed by the ISP.
The idea here is to get the public IP as soon as the IceOptions are
generated.
This changes the signature of getIceOptions() and removes it from
Account. After all, the account has no need to always manage ICE
the same way (maybe one day we will have accounts without ICE).

GitLab: #534
Change-Id: I56613e9ce48ef21f66dcf188d33334802aae601b
2021-05-03 20:25:01 -04:00
d97121c454 opensl: init audio engine on first use
Change-Id: Idc8e5bd4614212ecba3b8a075aaf91811ec97af1
2021-05-03 19:38:19 -04:00
790418d6d7 contrib: update tasn in gnutls to fix issue with Clang 10+
Change-Id: I49feed94b292030d9a308b999875f9f4c36f95f9
2021-05-03 19:05:11 -04:00
e22e931d48 opendht: bump version
Change-Id: Iea60885981394c7f1a2edea3d4496d7f7c4b86ca
2021-05-03 14:59:02 -04:00
0a7952c7b4 nodejs: add Conversation API, cleanup
Change-Id: Id95313931dc9d333cb7b3261f91b7ad5ad0751ad
2021-05-03 14:13:40 -04:00
e23b7bc938 nettle: bump min version to 3.6
Necessary to build gnutls

Change-Id: Ic243a9eb1ebcfbca8da368ead97c885c8c5c1c7c
2021-05-03 13:01:44 -04:00
cde5d4937d manager: cleanup sendCallTextMessage
Avoids retrieving the call by id twice.

Change-Id: I379d43f6b90dc2820ee8c6ee2391e64c78f6d8a5
2021-05-03 11:25:30 -04:00