| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
gupnp_context_get_host_ip has been deprecated for a long time, as
the host-ip property moved to gssdp.
There is also a ton of new deprecations but I will address that separately.
|
| |
|
|
|
|
|
|
| |
As we make use of the type 'GUPnPContextManager' we need to ensure that
this is known here. Relying on any other random header to being this in
for us is unreliable (and has been seen failing in the wild).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the last client of dleyna-server exits, and dleyna-server
tries to exit, it might use the "upnp" pointer after it was freed as we
receive a signal where the user_data is invalid. Avoid that by zero'ing
freed pointers and disconnecting from the signal for which "upnp" is
user_data.
See https://retrace.fedoraproject.org/faf/reports/855440/
|
|\ |
|
| | |
|
|/ |
|
|
|
|
| |
Updated Copyright from 2013 to 2015
|
|
|
|
|
|
| |
It's a uint32, not a signed int.
Fixes #145.
|
|
|
|
|
|
|
|
|
|
|
| |
According to Automake.pdf:
ACLOCAL_AMFLAGS: This variable is only useful in the top-level ‘Makefile.am’.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
Fixes #127.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
|
|
|
|
| |
Fixes #140.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
|
|
|
|
|
|
| |
Use instead gssdp_client_get_host_ip of gupnp_context_get_host_ip
Fix issue #104: <https://github.com/01org/dleyna-server/issues/104>
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
|
| |
When the wake-on method is UDP broadcast, we now use the broadcast
IP address of the active context newtork interface.
if the broadcast IP address can't be retrieved, we use the IP address
provided in the network interface info.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a sleeping device is removed from the network we persist it
in our memory cache device->sleeping_context to keep possible the
call of its wake method.
This patch delete a sleeping device persisted in memory cache if after
we call its wake method (successfully or not) we have not received any
alive sign from the device for a timeout based on the device LPE estimated
wake-on delay if it can be retrieved or a default one (30 seconds)
if none is provided.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
| |
- Add missing context Ip address idx initialization.
- Use UDP-Broadcast as default wake transport if none is provided
in the network interface info data.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The network interface info which is used for the device wake-on
is now stored in the dls_device_t structure instead of the
dls_device_context_t structure.
This makes more sense since we only store the one network interface
info element (the best matching) whatever the device context count
of a device.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The matching of the Network Interface information with the device
context was previously based on both the IP address and the device UUID.
In the case where no matching is found with this method, another try is
done by just using the device UUID match.
- Optimize the lookup by only adding to the network info list the
element matching the device UUID.
- The device context Network interface info IP address is used for the
wake-on packet sending.
- Fix UDP error initialization.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
| |
Some devices may continue to send SSDP messages even if they are
asleep. Thus we cannot assume that a device is awake just because we
can discover it. If a device is dicovered we need to retrieve it's
sleeping state via the UPnP GetInterfaceInfo action.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the last context of a sleeping device is notified as
unavailable, instead of having the device and its context deleted,
the device is kept alive, the lost server notification is not
broadcasted, the device is moved from the "device_udn_map" to a
"sleeping device udn" map and the context is stored
in a new device structure context field "sleeping_device_context".
All pending operations related to the device will also be cancelled.
The GetServer() request returns now the devices available in the
"sleeping device udn" map in addition to those in the "device udn map".
when a get_prop request is done on a device with a
sleeping_device_context available this one is used to perform the
request.
all Dbus requests other than "get_prop" and "wake" invoked on a device
with a sleeping_device_context available fail with an error
"DLEYNA_ERROR_OPERATION_FAILED".
when a new device proxy is notified as available, if it belongs to the
"sleeping device udn" map, then it is removed from the
"sleeping device udn" map and detroyed, the lost server notification
is then broadcasted. The new proxy device is then constructed as usual.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add the wake method implementation
A bytes buffer is computed from the wake on pattern hex string.
The buffer is sent according to the device wake transport method.
Wake transport methods TCP/UDP unicast and UDP broadcast
are supported.
If the device is not sleeping, the function returns with no error.
The TCP data sending is implemented with GSocketClient. It is done
asynchronously and so can be cancelled.
UDP data sending uses GSocket.
The default wake packet port 9 is used.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add a Wake method to DBus MediaDevice interface, this method
can be invoked to wake-up a sleeping device by sending the
appropriate WOL magic packet.
Information to be used for the magic packet formatting will be
retrieved from the device context.
- Add a DLS_INTERFACE_PROP_SLEEPING boolean property to DBus
MediaDevice interface, this property reflects the sleeping
state of the MediaServer.
The property is not present if the Energy Management service
isn't supported by the device embedding the MediaServer.
The DLS_INTERFACE_PROP_SLEEPING property is updated based on
the EM service NetworkInterfaceInfo evented state variable.
The DLS_INTERFACE_PROP_SLEEPING property is set to FALSE by
default at the device construction.
NetworkInterfaceInfo information are XML encoded, relevant
information are parsed with the help of libxml2.
dleyna-server has now a direct dependency on libxml2.
a new xml-util.c file with its header provides libxml2 helpers.
XML extracted information are stored into the matching device
context.
The matching device context is selected based on the interface
ip address and the device uuid.
A device is considered as in sleeping state if its network
interface is up.
- Add a DLS_INTERFACE_PROP_ROOT_UDN string property, if present
this property contains the UDN of the root device embedding a
MediaServer sub-device.
- Update the device contruction to allow the usage of a
MediaServer even if it is sub-device, in the same as way if it
was the root device from the application layer perpective.
We ask now to be notified for all upnp:rootdevice and we filter
those who are MediaServer or have a sub device of this type.
(recursive lookup in the device child hierarchy if any).
Only the first MediaServer device found will be considered.
we also retrieve the Energy Management service proxy from the
root device if it is available and else we use the first one
that we found by doing a recursive lookup in the device child
hierarchy. we use it to be notified of its NetworkInterfaceInfo
evented state variable changes.
- As we have now to handle multiple device proxies (CDS, EMS),
we use now a struct dls_service_t to gather cds and ems services
related information (GUPnPServiceProxy *proxy, gboolean subscribed,
guint timeout_id) in the device context.
- Add the Wake Method to the python test application.
- Documentation updated.
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
| |
- Some identation fixes
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|
|
|
|
|
|
| |
Fix issue #113: <https://github.com/01org/dleyna-server/issues/113>
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
| |
It is now possible to manage the 'Never Quit' option via
the Set() methode.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
| |
- Remove all WhiteListxxx API
- Add Set() to 'org.freedesktop.DBus.Properties' interface to
'com.intel.dLeynaServer.Manager' root interface
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fix #123: <https://github.com/01org/dleyna-server/issues/123>
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fix issue #122: <https://github.com/01org/dleyna-server/issues/122>
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fixes https://github.com/01org/dleyna-collabora-android/issues/58
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
| |
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix issue #109
* Remove LastChange signal
* Add Changed signal
* A Changed signal is emitted along with a ContainerUpdateID
signal when LastChange is not managed by the DLNA server.
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
|
|
|
|
| |
Add new BrowseObjects API in MediaDevice interface
Fix issue #114: <https://github.com/01org/dleyna-server/issues/114>
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Task GetAll has a field member 'filter_mask'.
This task and field are used by other methods, but not by GetAll properties.
GetAll parsing function used directly DLS_UPNP_MASK_ALL_PROPS constant in the code.
This will prevent to reuse the GetAll parsing function with another filter mask.
Initialize filter_mask to DLS_UPNP_MASK_ALL_PROPS in GetAll method and use
filter_mask in the GetAll parsing function.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
|
| |
Add a new 'Error' property, used by BrowseObjects for instance.
Error is a dictionary with 2 entries:
ID: u -> Numeric error code
Message: s -> Error message
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Remove various empty properties from Item and Container.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add 2 new settings:
1 - netf_enabled (boolean): To activate or deactivate the network filtering
2 - netf_entries (str list): List of supported network
Add org.freedesktop.DBus.Properties DBUS Interface to
com.intel.dLeynaServer.Manager root object.
Add 4 new methodes to com.intel.dLeynaServer.Manager interface
1 - WhiteListEnable
2 - WhiteListAddEntries
3 - WhiteListRemoveEntries
4 - WhiteListClear
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The libdleyna-server-1.0.so library is not really meant for public
consumption and it's just an internal implementation detail.
To prevent any confusion, ship it in a package-specific subdirectory of
the configured libdir.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Don't initialize result in task creation.
Avoid specific cases. It doesn't make the code more readable, nor smaller.
- if/else cleaning.
Make default action in if statement, and error management in else statement.
Most common usage.
- Factorize code.
Move same function call from each switch/case, outside the switch.
Reduce code.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fix issue #27: ip_address may be NULL and may be dereferenced.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fix issue #26: ip_address may be NULL and may be dereferenced.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
| |
Fix issue #3: device_type may be NULL and may be dereferenced.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Type property is now almost consistent with the MediaServer2Spec Type
property. This should remove a source of constant confusion and
fix a number of bugs, in for example the download sync controller.
dLeyna-server's implementation of Type differs only from MediaServer2Spec
in one way. dLeyna-server has introduced one new value, item.unclassified,
which is used when the object in question is an item but not one of the
items supported by MediaServer2Spec, i.e., not an audio, video or image
item.
A new property, TypeEx has been introduced. TypeEx contains the
extended type information for an object, i.e., the value Type used
to hold (althought the values have changed), so if applications want
the extended type they can still retrieve it.
Both Type and TypeEx are searchable. The superset of values specified
by TypeEx are permitted when creating a container, both in the type
of the container and it its create classes.
The extended type is exposed in the CreateClasses of a container and in
the LastChange event.
Type is no longer permitted in Update. TypeEx must be used.
From an API point of view there are two breakagaes:
1. Applications that used Type to retrieve extended type information,
need to be updated to use TypeEx. Applications that used Type
in their search queries might also need to be updated.
2. Applications that updated the Type of an object will need to be
updated to use TypeEx instead.
There is one slightly unpleasent hack required to report the correct
values for Search and Sort Caps. A correct solution would require
making the p_map hash table many to many, which would result in a bigger
change. I've left this improvement for another commit.
Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
| |
Signed-off-by: Regis Merlino <regis.merlino@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the way to identify root object.
We now use both object and parent ids values.
Object with a "0" object id value or a "-1" parent id value will
be considered as root object.
Reasons for accepting both:
a) there's code out there where root parent_id != -1 and
b) there's also code out there where root-like (parentless)
objects id != 0.
Object with a "0" id value or a "-1" parent id value
This fixes the case of issue #32 where root have an empty string as
parent id value.
According to the specification root parent id must have a "-1" value.
Fix issue: https://github.com/01org/dleyna-server/issues/32
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
|