neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/42155?usp=email )
Change subject: esim/http_json_api.py: support text/plain response Content-Type
......................................................................
esim/http_json_api.py: support text/plain response Content-Type
Allow returning text/plain Content-Types as 'data' output argument.
So far, all the esim/http_json_api functions require a JSON response.
However, a specific vendor has a list function where the request is JSON
but the response is text/plain CSV data. Allow and return in a dict.
Change-Id: Iba6e4cef1048b376050a435a900c0f395655a790
---
M pySim/esim/http_json_api.py
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/55/42155/1
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index cd95e0d..c268ce6 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -383,14 +383,18 @@
# SGP.22, section 6.5.1)
if response.status_code != self.api_func.expected_http_status:
raise HttpStatusError(response)
- if response.content and not response.headers.get('Content-Type').startswith(req_headers['Content-Type']):
- raise HttpHeaderError(response)
if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'):
raise HttpHeaderError(response)
# Decode response and return the result back to the caller
if response.content:
- output = self.api_func.decode_client(response.json())
+ if response.headers.get('Content-Type').startswith('application/json'):
+ output = self.api_func.decode_client(response.json())
+ elif response.headers.get('Content-Type').startswith('text/plain;charset=UTF-8'):
+ output = { 'data': response.content.decode('utf-8') }
+ else:
+ raise HttpHeaderError(f'unimplemented response Content-Type: {response.headers=!r}')
+
# In case the response contains a header, check it to make sure that the API call was executed successfully
# (the presence of the header field is checked by the decode_client method)
if 'header' in output:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42155?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iba6e4cef1048b376050a435a900c0f395655a790
Gerrit-Change-Number: 42155
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: pespin.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-remsim/+/42133?usp=email )
Change subject: rspro_server: fix releasing timed out clients
......................................................................
Patch Set 2:
(5 comments)
Patchset:
PS2:
I've reworked the patch.
File src/server/rspro_server.c:
https://gerrit.osmocom.org/c/osmo-remsim/+/42133/comment/ae4b2179_fb657093?… :
PS1, Line 773: if (conn->peer) {
> Hence why you must keep "conn->peer = NULL;" before in line 926.
Done
https://gerrit.osmocom.org/c/osmo-remsim/+/42133/comment/5fb9be8a_7bca197e?… :
PS1, Line 923: /* this will internally call closed_cb() which will dispatch a TCP_DOWN event */
> With your proposal you'll end up with a double free of the osmo_stream_srv afaict, from the parent t […]
Done
https://gerrit.osmocom.org/c/osmo-remsim/+/42133/comment/28841391_c911cd26?… :
PS1, Line 926: osmo_stream_srv_destroy(peer);
> osmo_stream_srv_destroy(conn->peer) calls talloc_free(conn->peer), so it totally makes sense to do c […]
Done
https://gerrit.osmocom.org/c/osmo-remsim/+/42133/comment/70f5cfc9_f9ed5e41?… :
PS1, Line 938:
> if (conn->fi) { […]
Re-ordered it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/42133?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
Gerrit-Change-Number: 42133
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 19 Feb 2026 17:37:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: lynxis lazus, pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-remsim/+/42133?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by pespin, Verified+1 by Jenkins Builder
Change subject: rspro_server: fix releasing timed out clients
......................................................................
rspro_server: fix releasing timed out clients
Fix crash on reconnects of clients if they timed out.
The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.
void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}
int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}
Re-organize the clean up:
* rspro_client_conn_destroy() will be only called by the FSM clean up
* closed_cb will inform the fi to clean up
Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
---
M src/server/rspro_server.c
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/33/42133/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/42133?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
Gerrit-Change-Number: 42133
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
lynxis lazus has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42154?usp=email )
Change subject: remsim: server: add a client timeout test
......................................................................
remsim: server: add a client timeout test
1. Connect to the server
2. Don't answer to IPA PINGs
3. Server closes the connection
4. Client reconnects
5. Older server versions will crash
Related: OS#6957
Change-Id: Iec52d3ce229c2ab84ab0ff9d8dbbff59b7f3fbd9
---
M remsim/REMSIM_Tests.ttcn
M remsim/RemsimServer_Tests.ttcn
2 files changed, 69 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/42154/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42154?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iec52d3ce229c2ab84ab0ff9d8dbbff59b7f3fbd9
Gerrit-Change-Number: 42154
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: Jenkins Builder