Piotr Kliczewski has uploaded a new change for review.

Change subject: stomp: make sure to send error message when no subscription
......................................................................

stomp: make sure to send error message when no subscription

When we get destination which is not know we need to send error response
with proper message.


Change-Id: I1880caa04bb5e506679da046a58491d3e29e10e2
Signed-off-by: pkliczewski <piotr.kliczew...@gmail.com>
---
M lib/yajsonrpc/stompreactor.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/43724/1

diff --git a/lib/yajsonrpc/stompreactor.py b/lib/yajsonrpc/stompreactor.py
index e3b71bf..48e892d 100644
--- a/lib/yajsonrpc/stompreactor.py
+++ b/lib/yajsonrpc/stompreactor.py
@@ -194,6 +194,11 @@
                                  dispatcher.connection)
                 return
 
+            if len(subs) == 0:
+                self._send_error("Subscription not available",
+                                 dispatcher.connection)
+                return
+
             for subscription in subs:
                 headers = utils.picklecopy(frame.headers)
                 headers = {stomp.Headers.SUBSCRIPTION: subscription.id}


-- 
To view, visit https://gerrit.ovirt.org/43724
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1880caa04bb5e506679da046a58491d3e29e10e2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to