- 11 Jan, 2017 2 commits
-
-
Guillaume Roguez authored
Many function/method pass shared_ptr by copy and not by (const) reference. As explained here [1], if the smast pointer is not supposed to be modified and used as an output argument, it's a bad usage as we cause an uneeded copy. As this copy causes a memory lock this lead to CPU and memory cache lock bad usage. This patch converts all these by-value into by-const-reference on all shared_ptr arguments over the daemon sources. [1] https://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/ Change-Id: Ic1e68d93a6917f5e2865b6818b7c1210ff98b1a8
-
Guillaume Roguez authored
Some builds, like OSX and Debian 8, fails to build the daemon as a patch has recently introduced a C++14 feature, but we don't support C++14 by default on all platforms. This patch changes the code to require only a C++11 compiler. Change-Id: Ib858a6abddb610b6f94cedc01945c0de92f00687
-
- 10 Jan, 2017 2 commits
-
-
Adrien Béraud authored
Add support for Ring device revocation. Each device manages a local revocation list, synced with other devices linked with the account. When a device is revoked, its certificate is added to the local certificate revocation list (standard x509 CRL). CRL support from the trust store and OpenDHT is used. Tuleap: #1457 Change-Id: I227e21afb3234e70ad562a5a4d0cf1084d61f174
-
Adrien Béraud authored
Change-Id: I1ab520134eb09f6801e820b5ec87967b14056027
-
- 09 Jan, 2017 1 commit
-
-
Adrien Béraud authored
Change-Id: I86c52900c2e20be5f7c331126180c37f0e17719c
-
- 05 Jan, 2017 3 commits
-
-
Adrien Béraud authored
Previous implementation was duplicating authorization checks between incoming call and message. Add two methods to factorize the checks: * foundPeerDevice will check the validity of the peer certificate chain * onPeerMessage will check the validity of the peer certificate chain, perform authorization checks using the account trust store (async), and call the provided callback if the peer is authorized. Change-Id: I80833a73c6842c9e84677fcaaef2a543745e005b
-
Guillaume Roguez authored
Change-Id: I6dbc51dd41c1f44d1446fe7365026af037bc86d9 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Adrien Béraud authored
Multi-device account migration used a certificate without the CA flag to sign the device certificate, preventing to properly validate the device certificate chain. Fix this by reusing the existing account migration API to ask for the account password when the case is detected, placing the account in the ERROR_NEED_MIGRATION state. ERROR_NEED_MIGRATION could also be used for future account migrations, when the password is needed to unlock the archive. Bump OpenDHT to check the certificate expiration date. Tuleap: #1434 Change-Id: I5527cf5bd31310d969819570cd984e622029fa71
-
- 04 Jan, 2017 1 commit
-
-
Simon Désaulniers authored
This functionality of RingAccount exposes methods to "track" a buddy with it's ringid. The RingAccount keeps a map of BuddyInfo for all buddies to track. The BuddyInfo struct contains the last time the device has been seen online. RingAccount exposes the following methods: * ::trackBuddyPresence which will look for a buddy's DeviceAnnouncement on the DHT to deduce the buddy's presence. This will be done each 10 minutes (DeviceAnnouncement expiration time). * ::getTrackedBuddyPresence which returns the relevant content from the map of BuddyInfo, i.e. if each of the buddy is online or not. Change-Id: Ib149585c4835da88b0b0248b4a866770d35afe90
-
- 26 Dec, 2016 1 commit
-
-
atraczyk authored
- prevents error C2910 which disallows explicit specialization of a member function outside the class if the function has already been explicitly specialized via a template class specialization. Tuleap: #790 Change-Id: Idde2413707abf0ef65a3445ea1d577c0394c7121
-
- 15 Dec, 2016 1 commit
-
-
atraczyk authored
- Microsoft's compiler doesn't support C99 designated initializers. Hopefully this we be added in the future, but for now we can comment the '.fieldname =' to achieve the same initialization, as long as all the elements are initialized in the fixed order that they were declared. Change-Id: I38af2eb66d583ef8f280ff8b4c7065c7d8229c02 Tuleap: #790
-
- 13 Dec, 2016 2 commits
-
-
Guillaume Roguez authored
fix warnings generated by our files. Reviewed-by:
Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Change-Id: I8b5b4d4c74ddfac6b3e40ae79f7382133632f9f2
-
Guillaume Roguez authored
RingAccount::startOutgoingCall() use an extra ringOnMainThread() call that gives nothing as forEachDevice() already call the callback into the main thread. Reviewed-by:
Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Change-Id: Ib2ff9d3f6274e4b6f8f418ce6670461942a2abd6
-
- 06 Dec, 2016 3 commits
-
-
Adrien Béraud authored
This reverts commit 60222051. Causes issues with peer verification Change-Id: Ib7d7d46b1a42ed952ec887b11f9e19b626274bd0
-
Guillaume Roguez authored
A DTLS type is needed for our DHT account. This type of transport is based on UDP + TLS. This kind of transport behaviour don't exist on current PJSIP v2.5.5 release. This patch adds this transport type, both for IPv4 and IPv6. Our PJSIP bridge class is modifier to support this new type for DHT account. Change-Id: I247fcb7c89fe23c99c580705c5f4a1d172b9c917 Reviewed-by:
Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
-
Adrien Béraud authored
Previous implementation was duplicating authorization checks between incoming call and message. Add two methods to factorize the checks: * foundPeerDevice will check the validity of the peer certificate chain * onPeerMessage will check the validity of the peer certificate chain, perform authorization checks using the account trust store (async), and call the provided callback if the peer is authorized. Change-Id: I237d3ccae4c6adba232564a05106ff77dc9cd9d8
-
- 05 Dec, 2016 1 commit
-
-
Guillaume Roguez authored
The dht listen operation is implemented as a lambda and was using a default capture by copy ('='). But due to missing brackets and the variable name reuse, a share_ptr refcount is overtaken. This patch fixes the brackets problem and replace the default lambda capture by naming each used variable to not have the issue later. Change-Id: I613065f0b1224677704d337bf29b6c5355bacedf
-
- 02 Dec, 2016 1 commit
-
-
Guillaume Roguez authored
SipsIceTransport doesn't set internal PJSIP transport correctly causing many troubles in how our ICE/DTLS underlaying transport works with PJSIP. This patch: * adds a custom dtls PJSIP transport type * implement correctly custom PJSIP transport creation * revert unneeded patches about IM fixes (da0a2d17 and 0cf16b30) as this patch fixes also the 30s issue Side-effect: this fixes the 'call failed' effect when peer hangs-up Change-Id: If88b8245d6c9ff76bc2f2456f06ff65bc5e723b1
-
- 01 Dec, 2016 3 commits
-
-
Guillaume Roguez authored
RingAccount::incomingCall() is no more blocking and also pushes part of its task on an async job. So calling this method using 'runOnMainThread' function is overkill, add code complexity and useless delay. This patch removes the call to runOnMainThread and use incomingCall() directly. Change-Id: I39bcc03edc8a2cd672cfda6be8fee310963d64f0
-
Guillaume Roguez authored
RingAccount::newOutgoingCall() run inconditionaly a call when NameDirectory::lookupUri() has made the lookup, even if the response is a failure code. This patch prevents the call to be started (and fail later... for nothing) in case of negative response of NameDirectory::lookupUri(). In that case, Call::onFailure(EINVAL) is called to close the object and warns upper layers. Change-Id: I5236b9221edc353e4a8106778e8b0ba9c5e96e67
-
Guillaume Roguez authored
Fix private RingAccount::startOutgoingCall() prototype to be able to remove an uneeded lambda 'mutable' in the code. Change-Id: I9c6366c6e5d588588ad3678bd2782d56b2a9db61
-
- 30 Nov, 2016 3 commits
-
-
Guillaume Roguez authored
Private structure must not be defined into the class definition file (usually the .h file). Replaced by forward declaration only. Code adapted for that (an inlined method has been un-inlined). Change-Id: If6fb375629c3c19494b177bc75ab6183e591e22e
-
Guillaume Roguez authored
Solving all 'unused' type of warnings seen in ringaccount.cpp file. Too much noise that hides real potential problems. Change-Id: I1dfe34e963a08206101bd8ac72abb9b8162a01de Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Guillaume Roguez authored
Fix RingAccount class members initialization order warning issued during build. Change-Id: I840365e70a406c4ceffde95af237bc56ed55d5b5 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
- 29 Nov, 2016 4 commits
-
-
Adrien Béraud authored
Factor iterating over peer devices Change-Id: Ia7635a8cad1b73c9a1ebbd6608e15c24d82b68fb
-
Adrien Béraud authored
Automatically sync device names between devices. Change-Id: Ie3c53d11ee0fba7a4bcddde8a45254654c3d4a44
-
Adrien Béraud authored
Add a new editable account detail: the ring device name. Change-Id: Id5dc42f276ad761d8b306a10faf97e4fbd58c9a2
-
Guillaume Roguez authored
This patch is an re-implementation of instant messaging system for the SIP layers, to use endpoint's request than dialog's request. This fix an issue where a packet drop during the request processing causes the dialog to be shutdown with error code 408 afer 30 seconds. This leds to shutdown of the whole attached invite session, so the call itself it terminated. Change-Id: I948c3eb1d6df992ed8364a01806cd92a42cf98a5 Tuleap: #1077 Tuleap: #1297
-
- 13 Nov, 2016 2 commits
-
-
Adrien Béraud authored
* check certificate chain of found account devices * log cleanup Change-Id: I761184966221f51ebe5d14b2ef63b7126b3fe35b
-
Adrien Béraud authored
The default name server is now defined at account creation instead of at account serialization so the default name server hostname is visible to the client during the first session. Reviewed-by:
Alexandre Viau <alexandre.viau@savoirfairelinux.com> Change-Id: Ib6695edae9cf8716581d10194af702dfc3ab4650
-
- 11 Nov, 2016 1 commit
-
-
Adrien Béraud authored
The call peer number is only used to set the peer for daemon callbacks for in-call text messages. It is currently set to the device ID instead of the RingID, which cause client confusion. Set the RingID instead. Change-Id: I75478afbd83fa5edaeae906fee5f667db7781943 Tuleap: #1262
-
- 07 Nov, 2016 2 commits
-
-
Mathieu Lirzin authored
In GNU packages the '.mk' extension is commonly used for Makefile fragments. Moreover it allows Emacs to choose 'makefile-mode' automatically when opening it. Change-Id: Ia35e5471b6852226027f975395cd21834783674b Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
-
Adrien Béraud authored
Tuleap: #1176 Change-Id: Id971e66435335fe66382fa6716f41b80a0b96975
-
- 04 Nov, 2016 1 commit
-
-
Adrien Béraud authored
Change-Id: I3846d3cae8382a69c4c9759155857d6687e4af9b Tuleap: #1184
-
- 03 Nov, 2016 3 commits
-
-
aviau authored
Change-Id: Iea054f129ef0a631204eb82e7cf321bf731285bb Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
-
Adrien Béraud authored
* drop support for hosting a server under a subdirectory * allow uppercase username (set to lowercase in daemon) * cleanup URI parsing, disallow space in URI [guillaume.roguez: fallback ns.ring.cx for the IP, as the ns server is not ready yet] Change-Id: I2fe86cba2faa79875f816ced108c1a0a4a7422be Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
-
Stepan Salenikovich authored
NameDirectory initialization errors should not be caught by the same try/catch block. Change-Id: I8f6b9a6f57f5bd1654c53a5871c50f1f7b2c3507 Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
-
- 02 Nov, 2016 2 commits
-
-
Adrien Béraud authored
Reviewed-by:
Alexandre Viau <alexandre@alexandreviau.net> Change-Id: I695e9bd42e7af3ba130c73e233410e171d022148
-
Adrien Béraud authored
* Use .cache/ring/namecache to cache found sameservice mappings * Parse URIs, use hostname as the nameserver (if any) or the default Change-Id: Id7b16369359fa798d91c89a82917509d5990eae1
-
- 01 Nov, 2016 1 commit
-
-
Adrien Béraud authored
Reviewed-by:
Alexandre Viau <alexandre@alexandreviau.net> Change-Id: I9b95dd1e061717f390e4fd5d5209b2aebe18dc9c
-