[rygel/wip/meson: 50/52] all: Fix deprecated functions
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/meson: 50/52] all: Fix deprecated functions
- Date: Thu, 18 Oct 2018 09:18:45 +0000 (UTC)
commit 7a592bdb20bf1e3d186eab3de84086a53f69f143
Author: Jens Georg <mail jensge org>
Date: Thu Oct 18 08:59:29 2018 +0200
all: Fix deprecated functions
src/librygel-core/rygel-basic-management-test.vala | 2 +-
src/librygel-core/rygel-configuration.vala | 2 +-
src/librygel-server/rygel-data-sink.vala | 3 +--
src/rygel/rygel-main.vala | 6 +++---
4 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/librygel-core/rygel-basic-management-test.vala
b/src/librygel-core/rygel-basic-management-test.vala
index 5417a532..5732dbc4 100644
--- a/src/librygel-core/rygel-basic-management-test.vala
+++ b/src/librygel-core/rygel-basic-management-test.vala
@@ -33,7 +33,7 @@ internal abstract class Rygel.BasicManagementTest : Object, StateMachine {
this._cancellable = value;
this._cancellable.cancelled.connect (() => {
if (this.execution_state == ExecutionState.IN_PROGRESS) {
- Posix.killpg (this.child_pid, Posix.SIGTERM);
+ Posix.killpg (this.child_pid, ProcessSignal.TERM);
this.execution_state = ExecutionState.CANCELED;
}
});
diff --git a/src/librygel-core/rygel-configuration.vala b/src/librygel-core/rygel-configuration.vala
index 3513f23b..e204653a 100644
--- a/src/librygel-core/rygel-configuration.vala
+++ b/src/librygel-core/rygel-configuration.vala
@@ -72,7 +72,7 @@ public interface Rygel.Configuration : GLib.Object {
*/
public signal void setting_changed (string section, string key);
- [Deprecated (since="0.19.2", replacement="get_interfaces")]
+ [Version (deprecated=true, deprecated_since="0.19.2", replacement="get_interfaces")]
public abstract string get_interface () throws GLib.Error;
[CCode (array_length=false, array_null_terminated = true)]
diff --git a/src/librygel-server/rygel-data-sink.vala b/src/librygel-server/rygel-data-sink.vala
index 9d5c8be0..3e197f50 100644
--- a/src/librygel-server/rygel-data-sink.vala
+++ b/src/librygel-server/rygel-data-sink.vala
@@ -72,8 +72,7 @@ internal class Rygel.DataSink : Object {
var to_send = int64.min (buffer.length, left);
- this.message.response_body.append (Soup.MemoryUse.COPY,
- buffer[0:to_send]);
+ this.message.response_body.append_take (buffer[0:to_send]);
this.chunks_buffered++;
this.bytes_sent += to_send;
diff --git a/src/rygel/rygel-main.vala b/src/rygel/rygel-main.vala
index 4a1d3b7e..289f44c1 100644
--- a/src/rygel/rygel-main.vala
+++ b/src/rygel/rygel-main.vala
@@ -63,9 +63,9 @@ internal class Rygel.Main : Object {
this.plugin_loader.plugin_available.connect (this.on_plugin_loaded);
- Unix.signal_add (SIGHUP, () => { this.restart (); return true; });
- Unix.signal_add (SIGINT, () => { this.exit (0); return false; });
- Unix.signal_add (SIGTERM, () => { this.exit (0); return false; });
+ Unix.signal_add (ProcessSignal.HUP, () => { this.restart (); return true; });
+ Unix.signal_add (ProcessSignal.INT, () => { this.exit (0); return false; });
+ Unix.signal_add (ProcessSignal.TERM, () => { this.exit (0); return false; });
}
public void exit (int exit_code) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]