[rygel/rygel-0-12] core: Handle host not reachable in ImportResource
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-12] core: Handle host not reachable in ImportResource
- Date: Tue, 20 Sep 2011 15:02:03 +0000 (UTC)
commit 62fca4ab43b1a10e3d786b1adc34cf5fff2a445f
Author: Jens Georg <mail jensge org>
Date: Wed Sep 7 15:33:08 2011 +0200
core: Handle host not reachable in ImportResource
src/rygel/rygel-import-resource.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-import-resource.vala b/src/rygel/rygel-import-resource.vala
index a9808d8..eb195e0 100644
--- a/src/rygel/rygel-import-resource.vala
+++ b/src/rygel/rygel-import-resource.vala
@@ -264,6 +264,15 @@ internal class Rygel.ImportResource : GLib.Object, Rygel.StateMachine {
}
private void finished_cb (Message message) {
+ if (this.status != TransferStatus.ERROR) {
+ if (!(message.status_code >= 200 && message.status_code <= 299)) {
+ this.status = TransferStatus.ERROR;
+
+ var phrase = status_get_phrase (message.status_code);
+ this.action.return_error (714, phrase);
+ }
+ }
+
this.run_callback ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]