After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653756 - Empty results on UPnP shows error
Empty results on UPnP shows error
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other Linux
: Normal normal
: ---
Assigned To: Juan A. Suarez Romero
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-30 16:50 UTC by Bastien Nocera
Modified: 2011-12-13 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ignore errors for empty results (4.20 KB, patch)
2011-09-29 12:59 UTC, Juan A. Suarez Romero
none Details | Review

Description Bastien Nocera 2011-06-30 16:50:54 UTC
Looking for "dsghdgsj" in totem's grilo plugin (selected a very old Rygel on a remote machine), I got:

(lt-totem:25462): Grilo-WARNING **: [upnp] grl-upnp.c:943: Operation (browse, search or query) failed

(lt-totem:25462): Grilo-WARNING **: [upnp] grl-upnp.c:946:   Reason: No object satisfies given search criteria.

And an error dialogue.
Comment 1 Bastien Nocera 2011-06-30 16:54:46 UTC
grilo and grilo-plugins 0.1.15
Comment 2 Juan A. Suarez Romero 2011-09-26 15:07:59 UTC
Do you know the exact version of Rygel?

Also, is the same error happening with a newer Rygel version?
Comment 3 Juan A. Suarez Romero 2011-09-29 12:59:15 UTC
Created attachment 197760 [details] [review]
Ignore errors for empty results

Seems like asking for a term and getting an empty result behaves different depending on the servers.

For some servers, the didl result is just empty, while for others the gupnp library is returning also an error, telling "no results match the search criteria".

As we want to deal with empty results as a typical case, let's ignore the error in this case and just tell the client that there are not results.
Comment 4 Juan A. Suarez Romero 2011-12-13 17:47:55 UTC
commit e0cd9cec5d9946e0d10a4a757974cffebd80833e
Author: Juan A. Suarez Romero <jasuarez@igalia.com>
Date:   Thu Sep 29 10:56:32 2011 +0000

    upnp: treat operation failure as something expected
    
    When using gupnp_service_proxy_end_action() ignore the returned result, and
    just check if the required data has any value or not.
    
    Reason is that with some versions, not having elements matching the required
    search text means getting an error in that operation, while in others it
    doesn't mean it, but just an empty result.
    
    As we want to treat not having elements as a typical case, better do not print
    the error as a warning, and instead notify that there are no results.
    
    This fixes https://bugzilla.gnome.org/show_bug.cgi?id=653756
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

 src/media/upnp/grl-upnp.c |   50 ++++++++++++++------------------------------
 1 files changed, 16 insertions(+), 34 deletions(-)