The UPnP stack now opens and closes ports with an
asynchronous mechanic and with callbacks.
Every time a mapping request (open or close) is sent,
a callback is registered and managed by the context.
When the corresponding protocol executes the request and
gets an answer, the right callback is found and dispatched
to its controller. A timeout of 1 second is implemented
on each request.
Controllers can now be tracked with a unique Id (a string
that represents its location in memory).
The IGD class now tracks its current active ports and
manages the number of users for each port.
The PMPIGD class now operates using a queue of mapping
requests. Whenever a request is made to the natpmp protocol,
it saves the request to its corresponding list (mapToAdd,
mapToRemove or mapToRenew in the PMPIGD class) and notifies
the main natpmp thread. The thread then checks if there
is any pending map requests in the PMPIGD queue and treats
them accordingly.
Add Nat-Pmp support for windows.
Fixed bug where nat-pmp wouldn't find an IGD on a new interface
after a connectivity change. The problem stems from the fact
that, for one, the nat-pmp handle didn't get cleared internally
once a connectivity change occured. This would cause the nat-
pmp library to try and send searches on a socket that was
bound on the old gateway. Secondly, if you don't wait for a
little period of time, the natpmp library would discover the
old IGD on the old interface before the connectivity change
modifications were completed. Now we restart the nat-pmp
process one second after the connectivity change triggers.
Change-Id: I39a9b57e237deaa65eef4464a1838eaa3c5bbb03
- any functions that get strings from windows apis, are converted
and stored as utf8 strings internally
- anytime an internal utf8 string is passed as a parameter to a
windows api function, it is converted to a wstring
- all of these translations apply currently to file paths
- a windows client should make sure to setlocale to utf8 because
we use some dependencies that call mbstowcs and wcstombs instead
of WideCharToMultiByte/MultiByteToWideChar
Change-Id: Ic13f55ace491e1088c0a3d436d3a0d02df7216c3
Reviewed-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
Update libupnp to version 1.8.4.
For windows, the IPV6 preprocessor must be undefined. Or else
libupnp won't initialize. Added visual studio 2017 support
via one patch for windows that also combines previous windows
patches.
UPnPController: Class that the jami classes use to control the
opening and closing of ports. Every service has it's own upnp
controller. The controller does it's actions by using the upnp
context class. Also refactored the functions used to add
mappings. Instead of using two different functions with
different types of parameters, we now use one function with
parameters that have default values. The logic stays the same
but the function call is more clear.
UPnPContext: Class that holds a (linked) list of discovered IGDs
and their corresponding protocols (which discovered them).
Whenever the controller wants to add or remove a mapping, the
context picks a valid IGD in it's list and uses the correct
protocol to complete the required action. This class also has
the ability to swap protocols for an IGD that was discovered
by more then one protocol.
UPnPProtocol: Virtual base class that defines the functions
needed by the context to use the corresponding protocol.
PUPnP: UPnPProtocol derived class that represents a upnp client
that uses the portable upnp library (libupnp). Every time the
client discovers a new IGD it uses a callback to add it to the
context's main IGD linked list. It also has an internal list of
IGDs that it discovered. Added features to this class include:
- IGD event subscription.
- Use UpnpInit2 function instead of deprecated UpnpInit
function. It's also supposed to support IPv6.
NatPmp: UPnPProtocol derived class that represents a upnp client
that uses the NAT-PMP library (libnatpmp). Unlike libupnp,
libnatpmp only supports discovering one IGD. Also uses callbacks
to add the IGD it finds to the context's main IGD class.
Also inclided debug warning prints whenever a controller opens
and closes the ports. That way we can keep track of whenever
the application opens and closes ports on the internet
gateway device.
Gitlab: #96
Change-Id: I199271edac2c6d93dc60c24e2e2aefe36de7950c
Add fetch_and_patch script for ffnvcodec.
fetch_and_patch script copies needed headers to contrib include
directory.
Patch file to adapt ffmpeg configure script for ffnvcodec package
inclusion. On linux pkg_config is used. On windows the files
need to be included manually.
config script includes path for ffnvcodec files and corresponding
flags are set.
Change-Id: Ia9daca2a49316a4373652acb718930d02f85e3f6
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
* rename namespace from ring to jami
* rename logs methods from RING_* to JAMI_*
* rename RING_VIDEO to ENABLE_VIDEO
Change-Id: Ic98498652d7059fafe58a96220d565bcdfa53658
- the default setting is /Zi(ProgramDatabase), so this patch
specifies that so the line can be removed with a sed in our CI
Change-Id: I2ac60d755569f8aec3ca94f4b73b9cae4993e8b1
Removes unused/deprecated audiorecord/audiorecorder
Allows any file to be used as a ringtone (mp3, ogg, etc)
Change-Id: I9ce33ec3d5f083caf098266befa597e78a95d7d6
FFmpeg's RTP muxer does not support GSM, while Ubuntu does not package
iLBC. Removes the old configure switches.
Removes package detection from contrib. Keeps contrib rules in case GSM
is later readded.
Change-Id: I705a521e2baf34c757c22a72e04cdf27233b5a7b
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=518765#c2
describes a bug that seems to occur during concurrent Jenkins
builds when /Zi (complete debug information) flag is enabled.
This patch changes the flag to "C7 Compatible (/Z7)" in an
attempt to prevent these failed concurrent builds.
Change-Id: I0a777c66651463488352d3e3797b89d5ed1b1791
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
Add libressl dependency to compile restbed with ssl support. Also,
this patch removes a unused file.
Bump asio to works with libressl instead of openssl.
Change-Id: I5a90dba97693ccda58899f69080e545bdea926d9
Signed-off-by: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
- adds rfc6062 patch for pjsip 2.5.5 for uwp
- updates files built by the vs project (adds some related to file
transfer, removes those that are deprecated)
- corrects native build problems
- simplifies project layout
- links the minimal client with libdl(temp fix)
Change-Id: Ib82b0470f568cb79dc1f4353cb5a5ef20de93033
* Bump restbed for OpenDHT, update patch and add patch to react
to timeout and socket closed in restbed.
* Bump OpenDHT to support push notifications
* Add DRing APIs to support setting a client push notification token
and to retransmit push notifications to dring
* Implement proxy support in RingAccount
Change-Id: I8d3a02cf54a9666a94ab992ee3fa2958e82aa7ad
- Updates the vs2015 project files
- Adds ciso646 header to diffie-hellman.cpp for logical operator
compatibility with the Microsoft compiler
Change-Id: Ie858e054bf26cf839bef6eace79fa546894a7963
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
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
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
- Adds accountarchive files to visual studio project and includes
ciso646 to ringcontact.h for alternate logical operator defs.
Change-Id: I712809bb7f25a3f9ed9ecb7e3b2abbab93892825
SipIceTransport was a first implementation of a SIP
transport working over an ICE transport.
It was insecure and is now unused and unmaintained
(last actual change is from February 2015),
and deprecated by SipsIceTransport.
Remove it from the code base to speed up compilation
and avoid accidental usage by confusion with SipsIceTransport.
Also fix minor warnings in SipsIceTransport
(std::move of an rvalue).
Change-Id: I7a8ce2c0570d92bfe8bd191f2f6c8c6f2b191980
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>