[rygel/rygel-0-16] server: Stop crash if force-downgrade-for is empty
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-16] server: Stop crash if force-downgrade-for is empty
- Date: Fri, 12 Oct 2012 09:39:36 +0000 (UTC)
commit bf5986dae07f82af586fae3784a4786d500bed08
Author: Jens Georg <jensg openismus com>
Date: Sat Oct 6 22:40:57 2012 +0200
server: Stop crash if force-downgrade-for is empty
Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=683934
src/librygel-server/rygel-v1-hacks.vala | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-server/rygel-v1-hacks.vala b/src/librygel-server/rygel-v1-hacks.vala
index 907b8af..9128f91 100644
--- a/src/librygel-server/rygel-v1-hacks.vala
+++ b/src/librygel-server/rygel-v1-hacks.vala
@@ -74,6 +74,8 @@ internal class Rygel.V1Hacks : ClientHacks {
if (agents.length > 0) {
agent_pattern = string.joinv ("|", agents);
+ } else {
+ agent_pattern = "";
}
debug ("V1 downgrade will be applied for devices matching %s",
@@ -105,8 +107,10 @@ internal class Rygel.V1Hacks : ClientHacks {
description_file.save (this.description_path);
var server_path = "/" + device.get_relative_location ();
- device.context.host_path_for_agent (this.description_path,
- server_path,
- this.agent_regex);
+ if (this.agent_regex.get_pattern () != "") {
+ device.context.host_path_for_agent (this.description_path,
+ server_path,
+ this.agent_regex);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]