Commit Graph

13016 Commits

Author SHA1 Message Date
36c252247a add Channel class
New class serving as inter-thread object queue.
Mimic Python "queue" module and/or Go "Channel" type.

Basic unit-test provided.

Change-Id: Ibd9bcb265ff6fe45aec1917ad152c2cd01935ddf
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-22 12:03:23 -04:00
c6b859dabc ringdht: make public some methods/attributes
To prepare the file transfer this patch add public access
on the DhtRunner attribute and forEachDevice() API.

Change-Id: I111fa7cd3af56b765781fec4ca3ced20f18269d1
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 22:28:23 -05:00
1954e251d2 manager.cpp: minor fixes
* remove "const" to addTask parameter (move-semantic)
* remove manager.h included twice
* include logger.h after manager.h

Change-Id: If546dacbe52aaad05d13c576695676edc7d06b24
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 22:28:03 -05:00
1263cf086c extract TlsSession private members
Use pimpl idiom to extract TlsSession implementation from definition.

Change-Id: I50f79dde8a89d6ec8db33cae2ef2004fc16d4457
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 15:26:12 -05:00
b7959f5b01 security: extract DhParams from TlsSession
TlsSession will be refactored to handle DTLS and TLS.
This patch cleanup TlsSession files to process further.

Change-Id: I76b6ac73d9fe46ee6a18c6c9d725f6fcadb465d9
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 15:25:55 -05:00
bbfcd57451 TurnTransport: better IO api and fixes
* API additions:
  - peerAddresses
  - readlinefrom
  - writelineto
* API changes:
  - recvfrom: char*/length version
  - sendto: per-peer call, not longer a map
* Add more API documentation
* Max TURN buffer size changed to 4096 bytes
* Better IO buffer management with peers
* Fix auth data (was temporary buffer pushing garbage values to server)
* Turn tests modified for API changes

Change-Id: I0bffe114301e8cb1e2f2e37d7a0eb5ba67f38c61
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-21 13:48:05 -05:00
785694ccae fix EOF of Sdp::printSession() output
This patch fixes garbage characters at end of printSession output.

Change-Id: Icb5e0b739810ddc889d2699e691d7caaebe1e83c
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-11-21 11:11:36 -04:00
813e12052e turn: add connection status to rfc6062 api
Add a connection status to turn_session on_peer_connection()
to notify when a peer disconnect.
Stop the peer connection on client side when the peer close the socket.

TurnTransport class changed to considere this new API and
transmit the information to user and closing peer IO.

Change-Id: I4997af9864829270876b6e6faddfa55da8ba7eb7
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-20 17:15:00 -04:00
b5fba93483 ice: log warn when no public IPv4 present in DHT msg
This is a helper to detect cases where the connection cannot
be established due to absence of public addresses.

Change-Id: Ibfdc221624f5edc9e8e0b9bcebc35e2b5335770f
2017-11-19 14:16:38 -05:00
deffff6d34 IpAddr: isLoopback() and isPrivate()
These methods are bugged with IPv4 address on little endian CPU.
Fix it by taking care of the endianness.

Change-Id: If4f0eb1dafc2c4dc6cde7d94ced7a8fec552cd80
2017-11-14 11:20:35 -04:00
56a78bfbe8 accel: don't crash on fallback
If no accel is found in getFormatCb, accel->codecCtx_ is null, and
segfaults.

Change-Id: Ibe3b246aaa0620f2dd5b91d2864fff65b6e8b794
2017-11-10 02:02:37 -05:00
04ee614fba contrib: check shasums for git snapshots tarballs
These tarballs (probably produces by git archive --format=tar) are
'fairly' stable. This means that git tries to not change the output of
this format, but changes happen occasionally due to bugfixes.

It's still a good idea to freeze the hash because we really want to know
when the contents of such a tarball might have changed.
A lot of other projects depend on these also (i.e. homebrew, buildroot,
etc.)

All hashes were locally computed.

Change-Id: Ib0b3fccab70236bd2eb7bbb236e1306af7cc5f36
2017-11-09 23:03:55 +01:00
3b5ee0249d contrib: use https instead of ftp urls
For gnutls, gcrypt, gpgerror and pcre this uses the canonical download
URL from their respective homepage.
For gmp we continue to use the GNU mirror but switch to https.
The tarball hashes are the same as before.

Not using ftp is also more friendly for people behind corporate
firewalls.

Change-Id: Iaf02a03549803a9374b1e35d8aa8234dd0895508
2017-11-09 22:43:52 +01:00
a116e8d083 use https for more downloads
Let's use https instead of http wherever possible.

For speex/speexdsp this is essential because they where using neither
https nor checksums.
For other pages it avoids unnecessary redirects hen they eventually end
up on a https url anyway.`

Change-Id: Ic07d74480b5a3f5adcf4db17b1bacd51b6aa4439
2017-11-08 14:24:08 -05:00
3a2bdef8b9 encoder: drop print_averror
This function hides the location where the error occurred, the daemon's
logs always pointed to print_averror with a failure of av_write_frame.

Change-Id: I25b703fc44969cc6726f11ed09ed67cc3edb6696
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-11-07 17:11:22 -05:00
9f0869cd9a accel: optimize get_format callback
Remove the second loop in the getFormatCb function. Ring will no longer
check the pixel formats twice in case hardware decoding isn't possible.

Change-Id: Ib03deb152394948979249828376bc4280b859424
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-11-07 16:14:47 -04:00
13d858bed1 media: remove old libav* macros
Change-Id: I6f7477c227e7b846c3399e7beabb90339c1bef90
2017-10-30 16:37:03 -04:00
66a5d04fdf contrib: bump OpenDHT to 1.4.2
* fix issue with reported addresses
* other minor improvements

Change-Id: Ic3a162fec5566c85d88533f5790977ee00eda379
2017-10-30 13:53:23 -04:00
e73f2551fe ringaccount: use base36 PIN for archive export
* Use base36 [0-9A-Z] instead of base16 (hex)
  for PIN generation.
  This increase the number of combinations from
  2^32 to ~2^41.36, an increase of ~9.36 bits.
  This increase should offset the entropy loss
  due to the optional password.
* Use random_device directly instead of the
  account (seeded) pseudo-generator because the PIN
  should have cryptographic-level randomness.

Change-Id: I00169f5d08f6794329a9e9e22b7173a0a6ef9ef4
2017-10-30 13:30:56 -04:00
c0f33babed eth: use dht random_device
Use random_device from OpenDHT to
profit of the fallback on MinGW.

Change-Id: I00d0221d30c298f4342950a404fc2980e702e10b
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-27 14:29:38 -04:00
09c3f2892d ios-build: use the macros in TargetConditionals.h
- Replaces the TARGET_OS_IOS(seems not used) with macros defined
  in TargetConditionals.h to correctly determine platform target.

- This only replaces the macro in urlhook.cpp preventing the use
  of the system function, which is critical to the iOS build.

Change-Id: I4ba40aefe212bf1279a4813d1cdc2d14ddbd4273
Reviewed-by: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
2017-10-26 10:30:43 -04:00
47f598468d contrib: bump msgpack
Bump msgpack to latest stable version 2.1.5
Relevent fixes for Ring:
* fix unpack visitor to treat float32/64 correctly
* fix alignment problem on some platform (includes arm)

Change-Id: I3c3300c02e91435b0e72ae48e2614efad3e3b936
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2017-10-25 11:04:00 -04:00
d8691f9225 contrib: disable building prce executables
* add patch to prevent the build of pcre executables and tests
* update pcre from 8.40 to 8.41

Change-Id: I0cd008e59c905ab44a02c11808a8cf9233063817
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
2017-10-25 08:56:59 -04:00
621198dbbc android: activate hardware decoding on 32 bits
Hardware decoding for 32 bit platforms was fixed by FFmpeg commit
dd8ffb191fd24f5b783b9722f63019120d61c48c, which in included in the
latest bump.

Change-Id: I1ec4a91ae85902d225938921dee8eaf236f7ef9e
2017-10-24 11:38:53 -04:00
9031f167c5 fix: don't run system commands on iOS
Change-Id: I12eabe030e084a274e4774ff1314d129323cf8bd
2017-10-23 16:13:20 -04:00
df0a8fe199 contrib: bump OpenDHT to 1.4.1
* bug fixes

Change-Id: Ibb43672a1a0209f109df579dff1a1f9176ed2186
2017-10-20 17:53:18 +02:00
9a85ecd553 contrib: bump OpenDHT to 1.4.0
* fix transaction ID reuse bug
* fix minor issues
* minor performance improvements

Change-Id: I7bc0bfa6d3b0f48a0cec9ab4554d265e415c8a68
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-19 16:19:12 -04:00
5066a44f95 contrib: bump ffmpeg
A non exhautive list of what this bump brings:
- Direct 3D 11 hardware decoding (UWP)
- Uniform API for vaapi, vdpau, videotoolbox, dxva2 and d3d11va
- 32 bit MediaCodec fix (Android hardware decoding)
- Non X screen capture on Linux (Wayland support)
- Better VP9 support
- Various bug fixes and optimizations

Due to problems with the VideoToolbox acceleration, the bump for MacOS
is postponed.

Change-Id: Id05a1d789c90ea1321f10e801a036c47b6f76d88
2017-10-19 06:29:41 -04:00
205d5be178 vpx: fix if negation typo
Change-Id: I4cbf78b2a8c6e55458ca5d1867daf4adf1696f27
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-10-17 18:56:19 -04:00
5582234943 contrib: fix vp8 encoding on windows 32 bit
Fixes https://bugs.chromium.org/p/webm/issues/detail?id=1363 with the
solution proposed by comment #5.

This fix was used successfully in GStreamer:
https://bugzilla.gnome.org/show_bug.cgi?id=763663

Change-Id: Id45604fff8a4bc7f76ce256684af7d4bace0db6c
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-10-17 16:27:46 -04:00
df706064f6 RingAccount: prevent insertion of empty file content in archive
Rewrite of RingAccount::updateArchive() to prevents
insertion of empty file contents in case of non-existing files.
This may cause later empty-object creation with misleading usage.
Also exposes filtered and base64 decoded keys to easier code
readability and maintainance.

Change-Id: Id2d504ad73caaaad519be0344c3fb424ada35c20
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-16 17:08:37 -04:00
8b5ef96477 ringacount: don't export device id/name to archive
Account archive is meant to be device-independent,
so don't export device-specific configuration to it.

Change-Id: Iebc3fba81a445f0c28da3ca4f9086a72a436e173
2017-10-10 10:25:00 -04:00
212b50e973 contrib(UWP): (fix)bumps pthreads to avoid deadlock during upnp init
After removing the boost dependency, the Ring UWP was unable to load
accounts with upnp enabled, as a deadlock would occur within the
threadpool initialization rountine of libupnp. I think the windows store
build of pthreads was preventing win32 thread management api symbols
from being defined. Something which loading boost must have been doing.

- Bumps pthreads-win32 from 2.9.1-release to 2.10.0-rc
- Builds a win32 static lib without windows store flags and uwp libs
- Modifies the libupnp and threadutils vs project patching

Change-Id: I3f43a066d86d284c614521fdb016810148590e70
2017-10-08 06:33:58 -04:00
942edca546 doxygen: enable autobrief
Enable an usefull option to make easier documentation writting.

Change-Id: I7d0ea254a913dab09548f17167d432d75de901e4
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-05 11:38:49 -04:00
2cc09ccc12 configure: remove accel build options
The --disable-[accel name] switches of the configure script are a
nightmare to maintain. They break with every bump of FFmpeg, and don't
work right half the time.

Keep only global switch --disable-accel.

Change-Id: I6b645f7102abb3903c27d7dac7d70f7f15a5e728
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-05 10:03:14 -04:00
37507752fb contrib: remove boost
Change-Id: I278ff88143330e826629268bc47e810ef1da6de2
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-04 15:09:13 -04:00
b42882bc4e git: ignore global tags
Ignoring generated files from gnu global tool.

Change-Id: I8a94a8eead33a512cb65c692d01dc1e2610338fa
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-10-04 13:32:29 -04:00
f1819432b5 add pjnath TurnTransport class
TurnTransport class is a C++ wrapper on PJNATH turn socket API.
Bring an easy to use socket connected to a TURN server.
Support TCP (even with peer) and UDP connection types.

Requires rfc6062 support into pjproject 2.6, given by patch:
88c820ee60 / contrib: implement rfc6062 in pjnath

Include fonctional tests working with turn.ring.cx.
Run tests as usual with "make check" command.

Change-Id: Idf14c2ea192cab2fccf99b142492086284920a6b
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-04 11:49:00 -04:00
5bdbead790 contrib: fix ffmpeg compilation on 32 bit android
Don't define _FILE_OFFSET_BITS=64 on 32 bit android: this is no longer a
no-op starting with NDK 15.

Log2f patch no longer required.

Change-Id: I3d42ee9507e151becc2e39a5e97fa9a0fd011261
2017-10-04 10:56:52 -04:00
f5472fb801 contrib: use cmake Android cross-compilation infrastructure
Prevents cmake from trying to use the system toolchain on macOS.

Change-Id: Ia4890ce07e10395832fb3c9ecbab8cea8e637826
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2017-10-04 10:54:03 -04:00
e3918801a3 contrib: remove cryptopp
Change-Id: I2ce2bdbc87d8c0de4cebbb3cc00e4a76286aee82
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-04 10:36:13 -04:00
07e4c5d762 mingw: fix build with secp256k1
* Prevent symbols export (was the cause of wring libring.dll.a)
* Do not build tests binaries (waste of build time)

Change-Id: Ic823790f0371ae6320f8d6a4d5e9a925938b4f8d
2017-10-04 00:31:32 -04:00
58fd779117 require C++14
Move build requirements from C++11 to C++14, for contrib and core.

[GR: ci msg + contrib support + m4 update]

Change-Id: I22793ba1ca06ea7c45d237c882a92d20a008f76f
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2017-10-03 09:33:58 -04:00
44c61afc72 eth: bump sources, remove dependency to boost, cryptopp
Update "eth" to latest version from
https://github.com/ethereum/cpp-ethereum

This new version makes use of secp256k1 instead of custom
code and cryptopp to handle EC generation, and reduces its dependency
to boost to use more of the C++11 STL.

This allows to trim the code to completely remove the boost and
cryptopp dependencies.

Change-Id: I19118d3b833a9425cddbeabf6d0b6e07d5a4b15e
2017-10-03 02:14:01 -04:00
dc7891c4b9 fix various issues with IpAddr interface
* prevent copy-initialisation with integer values
  (maybe not what we want to do)
* remove by-pointer ctor API
  (we don't need nullptr case)
* fix constness misuse on sockaddr conversion methods
* fix constness of bool conversion
  (for cases where the IpAddr instance is not const)
* fix IpAddr rich-comparators (add <=, >=, <, >)
  (fix usage of IpAddr as key in a map, where
  the comparator is std::less, operator== was not used)

Change-Id: Iba9cf641d68bda37bd32d85dbd9dfffdc99078ed
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
2017-10-02 16:53:38 -04:00
625f6b479e contrib: add secp256k1
New dependency for eth sources

Change-Id: I5e03d42ce4a59267212cf175952e615412b1cf26
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2017-10-02 15:14:48 -04:00
c3648232db osxvideo: fix avfoundation device name
Fixes a bug introduced in "osxvideo: use avfoundation indev" where the
video device didn't have the right name.

Change-Id: Ib2b31191925e89b6478a61812667ed5f86acc5d2
Reviewed-by: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
2017-09-29 13:57:39 -04:00
189de4e66f ringaccount: (fix)sets the ringId/username for disabled accounts also
- Commit e57038fe...(ringaccount: sets the ringId/username for disabled
  accounts also) caused the deviceId to be loaded into ringAccountId_
  for disabled accounts. This patch load devices, contacts, and trust
  requests for disabled accounts while exiting from loadAccount as early
  as possible.

Change-Id: If45ab84ac301faa5776d6af5436e672195c51501
2017-09-29 08:24:59 -04:00
88c820ee60 contrib: implement rfc6062 in pjnath
A first try to implement the RFC 6062 into PJNATH.
More explanations into the rfc6062.patch itself.

Note: not ready to be pushed up-stream to pjproject.

Change-Id: I445f0c8a8db03c9a4a5b04d24ef63ff4f711a725
Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
2017-09-28 14:19:02 -04:00
7b0bf45a92 android: reactivate neon optimizations
NEON instructions no longer cause a SIGBUS error.

Change-Id: I30e445de66abe2f51c1732e76a88e8a708532776
2017-09-27 21:04:19 -04:00