laforge submitted this change.

View Change


Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve dexter: Looks good to me, but someone else must approve Jenkins Builder: Verified
osmo-smdpp: Make sure to return empty HTTP response in handleNotification

SGP.22 is quite clear in that handleNotification shall return an empty
HTTP response body. Let's make sure we comply to that and don't report
a JSON response.

Change-Id: I1cad539accbc3e7222bfd4780955b3b1ff694c5b
---
M osmo-smdpp.py
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 6c275ac..390db18 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -186,7 +186,9 @@
print("Rx JSON: %s" % json.dumps(content))
set_headers(request)

- output = func(self, request, content) or {}
+ output = func(self, request, content)
+ if output == None:
+ return ''

build_resp_header(output)
print("Tx JSON: %s" % json.dumps(output))

To view, visit change 37497. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1cad539accbc3e7222bfd4780955b3b1ff694c5b
Gerrit-Change-Number: 37497
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged