[rygel] core: Ability to bind to specific networks
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Ability to bind to specific networks
- Date: Mon, 31 Jan 2011 14:31:44 +0000 (UTC)
commit 472b632e84318730c1b3ab43a12a45b5774eadc5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jan 26 20:51:09 2011 +0200
core: Ability to bind to specific networks
data/rygel-default.conf | 5 +++--
data/rygel-maemo.conf | 5 +++--
src/rygel/rygel-main.vala | 16 ++++++++++------
3 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/data/rygel-default.conf b/data/rygel-default.conf
index d32c445..088fd16 100644
--- a/data/rygel-default.conf
+++ b/data/rygel-default.conf
@@ -26,8 +26,9 @@ enable-mp2ts-transcoder=true
# Set it to 'false' if you want to disable WMV transcoding support.
enable-wmv-transcoder=true
-# The network interface to attach rygel to. Leave it blank for dynamic
-# configuration.
+# The network interface to attach rygel to. You can also use network IP or even
+# ESSID for wireless networks if you are using NetworkManager. Leave it blank
+# for dynamic configuration.
interface=
# The port to run HTTP server on. 0 means dynamic.
port=0
diff --git a/data/rygel-maemo.conf b/data/rygel-maemo.conf
index 2aca50a..bd2e5e0 100644
--- a/data/rygel-maemo.conf
+++ b/data/rygel-maemo.conf
@@ -26,8 +26,9 @@ enable-mp2ts-transcoder=false
# Set it to 'true' if you want to enable WMV transcoding support.
enable-wmv-transcoder=false
-# The network interface to attach rygel to. Leave it blank for dynamic
-# configuration.
+# The network interface to attach rygel to. You can also use network IP or even
+# ESSID for wireless networks if you are using NetworkManager. Leave it blank
+# for dynamic configuration.
interface=
# The port to run HTTP server on. 0 means dynamic.
port=0
diff --git a/src/rygel/rygel-main.vala b/src/rygel/rygel-main.vala
index 14c70f0..5232dd1 100644
--- a/src/rygel/rygel-main.vala
+++ b/src/rygel/rygel-main.vala
@@ -121,7 +121,8 @@ public class Rygel.Main : Object {
GUPnP.Context context) {
string iface = null;
- debug ("new network context %s (%s) available.",
+ debug ("New network %s (%s) context available. IP: %s",
+ context.network,
context.interface,
context.host_ip);
@@ -129,7 +130,9 @@ public class Rygel.Main : Object {
iface = this.config.get_interface ();
} catch (GLib.Error err) {}
- if (iface == null || iface == context.interface) {
+ if (iface == null ||
+ iface == context.interface ||
+ iface == context.network) {
try {
var factory = new RootDeviceFactory (context);
this.factories.add (factory);
@@ -143,15 +146,16 @@ public class Rygel.Main : Object {
err.message);
}
} else {
- debug ("Ignoring network context %s (%s).",
- context.interface,
- context.host_ip);
+ debug ("Ignoring network %s (%s) context.",
+ context.network,
+ context.interface);
}
}
private void on_context_unavailable (GUPnP.ContextManager manager,
GUPnP.Context context) {
- debug ("Network context %s (%s) now unavailable.",
+ debug ("Network %s (%s) context now unavailable. IP: %s",
+ context.network,
context.interface,
context.host_ip);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]