laforge has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/97/37497/1
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: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange