Because we remove the certificate, there is nothing to verify.
Also fix tests broken with new validation.
Change-Id: I8003e5d1b8cd61cfc9d944b57725081667485c00
- mobile shutdown: added time / block for callback
- check existing connection before removing node from rt
- threadpool instead of lock for shutdown
Change-Id: I79fc9506cd465763cd38723aedd08a59a0573970
This patches avoid swarm members to connect to all devices of the
conversation by using a better routing mechanism.
The idea is to add a component called "DRT" that will store, like
a DHT, a routing table containing the known devices of the conversation.
The DRT is bootstraped with the list of the devices that already wrote
a message in the conversation, else with some other members that have
devices present (because lot of devices may never have written any message).
Moreover, because a user can import an old backup without the conversation
and without other devices present, we also try to connect to 2 other random
members because they may never connect if they are on an old back-up.
Once bootstraped, the DRT is used to decide to who a user should be
connected. And it will use approximately log(N) connections (instead
of N like before). So, when sending a message, a user will send to
connected peers (and some mobiles). Then, some peers in the conversation
will get the message, pull it, then announce to their nearest peers (and
some mobiles) until all peers got the new message. To avoid infinite loop,
we check if we already got the commit and if we have something to announce.
Finally, if somebody disconnect, this will cause the DRT to try to re-fill
its bucket and try to connect to a new device.
GitLab: #297
Change-Id: I137788c77219fe74287585882260547cc5628784
This patch adds the minimal code for the DRT. This component
should avoid the fact that every peer in a swarm must connects
to every other peer.
The idea is to get a similar algorithm we use in OpenDHT, meaning
to store known devices in buckets and try to dynamically connect
to some of the peers, creating a routing table, so every peer
in a conversation should connect to a subset of peers.
The big difference is that we must includes mobile devices (for
OpenDHT push/baterry optimizations can be taken into accounts).
For this, we consider a special type of node in the DRT that is
considered as reachable but not connected and stored in the mobile
nodes. A mobile announces itself as a mobile after bootstraping
via a message in the swarm channel. In this case, if they disconnect
the node is moved to a special state (mobile node) instead (known nodes).
A user can know to which devices they can send messages via Routing
Table's mobile nodes and connected nodes.
Docs: TODO add link
GitLab: #297
Change-Id: Ic061c58ca487698afee712cb2eef5e57f9c208fb
Use the negotiated medias to start conference in a correct state
(e.g. if calling a swarm in audio-only we should only see
one audio only participant). The previous code was incorrectly
starting the conference and adding an extra partipant when
attaching the call.
Note: lot of code in conference is also currently re-factored for
homogeneizing 1:1 and video conferences. So I prefered to avoid
to change a lot of things there.
A test is also added to check that video or audio is correctly
attached in the participants information.
Change-Id: I074cc4eb41b21418a6d751e3395db93e8a4da7f5
GitLab: #803
This avoid to erase the content of a file if it's an hard link,
which was the case for file transfers.
Change-Id: I5ee2ace650de0ef12953e5643f014e62e2d3c04d
If a member is banned from a conversation, only administrators can
re-add this member. So, clients should not show them in the list
for non admin users.
Moreover, clients should be able to show banned members in a list.
Change-Id: I0b0a80f1e2a3ed15339cd749e66dfa3e469f403c
ut_syncHistory was broken since "filetransfer: massive cleanup"
due to this (An account without conversation MUST sync it's profile).
So use an empty conversation to use nonSwarmTransferManager_
Change-Id: I6d6f27875129730ebaac60ba40652fd1795311cd
Regression introduced with config changes, it was not possible
to rename a device.
Also, call knownDevicesChanged() because clients should update
their list if a name changes
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/916
Change-Id: I723a509d45149bd6b38e4250e7668cb918eba583
The protocol already supports start/end but it was never used.
This patch:
+ Open the incoming file in append mode (else it will restart)
+ Pass start=detectedOffset to the peer to restart the download
where we need.
+ Only remove the file if the file is EOF or cancelled by the
user to avoid to restart from 0.
GitLab: #788
Change-Id: I8eee635a076e668af226fd9ad7ba372f6adae3f6
Also, fix previous illformed files if declineConversationRequest
was called before this patch, some incomingTrustRequests exists
without conversation request linked.
Change-Id: Id34a6f0cfcc9df1a39ffb055b7d62975266e2399
Initializing a ICE session will need to gather candidates. The TURN
can be long to retrieve, and fails can be really long to detect.
There is at least 3 cases of failures:
+ IPv6 badly configured, which can cause a DNS resolution timeout
of several minutes (that's why the IP was cached)
+ Empty DNS entries, causing a resolution failure
+ A TURN server un-reachable or wrongly configured (e.g. 1.1.1.1)
The idea here is to resolve the TURN and test the connection before
caching it. And use it when cached.
This avoid all resolutions steps and we're basically sure that
it was working.
Other approaches:
+ Add a new callback in pjsip to detect that the TURN is taking too long
to remove it for next calls, but I prefer to not add another patch in
pj and it's not an ideal solution
+ trickle ICE to not wait for all candidates, but this is a big changes
and will generate more DHT messages
+ Do not retransmit messages, but this is against the RFC
Change-Id: I2bbc8d9ae76a9e3124c71343df02e2ed077b938d
GitLab: #781
This is a pretty trivial patch as all the necessary logics are
already supported by the deamon.
A client can use sendMessage with flag = 2 to add a reaction.
This only adds a "react-to" in the body of the message that the
client can interpret.
To remove a reaction, the client can use editMessage (and set the
body to "" for the id of the reaction), also there is no limit
on the content of the reaction and multiple reactions can be added
to the same message.
For non compatible clients, it will be shown as a simple text message
as it's the same type.
Change-Id: I7b13d32771109118b94ed17d0b918e66487e94bb
Initializing a ICE session will need to gather candidates. The TURN
can be long to retrieve, and fails can be really long to detect.
There is at least 3 cases of failures:
+ IPv6 badly configured, which can cause a DNS resolution timeout
of several minutes (that's why the IP was cached)
+ Empty DNS entries, causing a resolution failure
+ A TURN server un-reachable or wrongly configured (e.g. 1.1.1.1)
The idea here is to resolve the TURN and test the connection before
caching it. And use it when cached.
This avoid all resolutions steps and we're basically sure that
it was working.
Other approaches:
+ Add a new callback in pjsip to detect that the TURN is taking too long
to remove it for next calls, but I prefer to not add another patch in
pj and it's not an ideal solution
+ trickle ICE to not wait for all candidates, but this is a big changes
and will generate more DHT messages
+ Do not retransmit messages, but this is against the RFC
Change-Id: Iaec4308bca8cbbbfa4d6b1b6d7a7759b8062a67a
GitLab: #781
The new logic is there! Swarm is working since some time now, so we can
remove previous logic.
GitLab: #524
Change-Id: I5ca172e9349694d944c9561d97fe8a63d190ebf3
This avoid mobile phone to host conferences for others unless
explicitly authorized by the user.
Clients can show it via the "hostConference" conversation's preference.
Documentation: https://docs.jami.net/technical/swarm.html#call-in-swarm
GitLab: #312
Change-Id: I9bbd3e394cd1b3bcfd4a3120d9023a5ed686303d
This patch introduces the ability to start calls and extends the
usage of rendezvous points to swarm with multiple participants.
When starting a call in a swarm with multiple participats, one device
will work as the host of the conference, and the caller will
immediately start the call alone.
Other peers will receive a commit and a notification to be able
to join the active call. To join a call, users needs to call
rdv:uri/device/convId/confId to be added (if authorized) to the conf.
There are some majors differences in the process.
First, every conversation will be able to decide a default host
for conferences. This still needs some design and will be
introduced in another patch. For now, the caller is the host.
Then, because all members of the call may not be interested to join
a call, or they may want to get several calls at the same time, the
system must be able to manage more than one active calls (e.g. a
company with multiple projects can do several standups at the same
time).
Finally, in the conversation, two commits will be generated to be
able to know what active calls are available. The first is
announcing that a conference started, the second announces that
the conference stopped (the host closed the call).
However, this introduces a difficulty. The host may crash and not
commit the end of the call in time. In this case, hostedCalls are
stored in a file and the conversation is updated during the init
of the daemon.
Change-Id: I081a4920edb3773bbed884ae50f34e476ad42094
Documentation: https://docs.jami.net/technical/swarm.html#call-in-swarm
GitLab: #312
As a measure of refactorization of the code and to prepare to the
development of dhtnet, the following changes aims at seperating
jami-specific code to connectivity-specific code.
GitLab: #778
Change-Id: Iaa08100f7d61c80292f039a5aae66819cc85b0e9
If an error occurs during the execution of git_remote_fetch, there
is no need to signal any error to the client as it's not a critical
issue (no malformed conversation, mode is recognized, no unauthorized
method) and the sync will be retried later.
Change-Id: I2d875445e51aa6cd78eb2e7dbfe5efb8b2831860
It's not possible to replace the DRing namespace for jami because of conflicts
with namespaces and classes defined under the jami namespace. Thus, use libjami
as the namespace.
Script to reproduce:
rg -l DRing | sort | uniq | awk '$0 !~ /NEWS/' | xargs sed -i -e 's|DRing|libjami|g'
rg -l DRING_ | sort | uniq | xargs sed -i -e 's|DRING_|LIBJAMI_|g'
sed -i -e 's|dring|jami|g' src/jami/CMakeLists.txt
sed -i -e 's|dring|jami|g' src/jami/def.h
Change-Id: I80e8c8b58a7586527a016bbef850bab07869c473
logUntil should retrieve the commits with the commit passed.
Add a LogOptions parameter to avoid too much parameters.
Change-Id: I77a0150b135b14fe44577747d2b1a86cb2cf2509
The sinks only should be created when there is a video device
available. If no video device is available, no sinks should be
created.
Change-Id: Iec35288bf9966eb664470b2f8c1e5738f6909893