lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

July 2024

  • 1 participants
  • 1379 discussions
[S] Change in docker-playground[master]: ttcn3-asterisk: extensions.conf: Reject subsequent MO/MT calls in VoL...
by pespin 16 Jul '24

16 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37477?usp=email ) Change subject: ttcn3-asterisk: extensions.conf: Reject subsequent MO/MT calls in VoLTE when busy ...................................................................... ttcn3-asterisk: extensions.conf: Reject subsequent MO/MT calls in VoLTE when busy Reject calls when the VoLTE endpoint is already busy with an ongoing call. Related: SYS#7003 Change-Id: If4ce1fee36e51ac72681ac2ce04531d501ccb56c --- M ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf index e7ed535..5688153 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf @@ -31,16 +31,24 @@ same => n,Hangup(16) exten => _.!,1,Verbose(5,${EXTEN}: Call external number from ${CALLERID(num)}) + same => n,Set(GROUP()=IMSgroup) + same => n,GotoIf($[${GROUP_COUNT(IMSgroup)} > 1]?999) same => n,Dial(PJSIP/${EXTEN}@volte_ims) same => n,Hangup(16) + same => 999,Verbose(1,${EXTEN}: VoLTE client already busy (${GROUP_COUNT(IMSgroup)}) rejecting call from SIP UA ${CALLERID(num)}) + same => n,Set(DIALSTATUS=CHANUNAVAIL) [volte_ims] exten => _.!,1,Verbose(5,${EXTEN}: Call internal number from ${CALLERID(num)}) + same => n,Set(GROUP()=IMSgroup) + same => n,GotoIf($[${GROUP_COUNT(IMSgroup)} > 1]?999) same => n,WaitForPrecondition(10,2000); same => n,Gosub(get-valid-endpoints,s,1()) same => n,Set(DIALGROUP(CALL_EVERYONE_LIST)=${GOSUB_RETVAL}) same => n,Set(DIALGROUP(CALL_EVERYONE_LIST,del)=PJSIP/${CALLERID(num)}) ; remove the caller same => n,Dial(${DIALGROUP(CALL_EVERYONE_LIST)}) same => n,Hangup(16) + same => 999,Verbose(1,${EXTEN}: VoLTE client already busy (${GROUP_COUNT(IMSgroup)}) rejecting call from IMS ${CALLERID(num)}) + same => n,Set(DIALSTATUS=BUSY) -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37477?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If4ce1fee36e51ac72681ac2ce04531d501ccb56c Gerrit-Change-Number: 37477 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-asterisk: extensions.conf: Reject calls if all SIP UAs busy in ...
by pespin 16 Jul '24

16 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37494?usp=email ) Change subject: ttcn3-asterisk: extensions.conf: Reject calls if all SIP UAs busy in call ...................................................................... ttcn3-asterisk: extensions.conf: Reject calls if all SIP UAs busy in call Before this patch, asterisk would ring on local SIP UAs already in a call, which is not the expected behavior for this project. Related: SYS#7003 Change-Id: Id9e3ead6e28a53793c6cceb6f23d5e6d987521d8 --- M ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf 1 file changed, 38 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified jolly: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf index 5688153..fdfae23 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf @@ -1,7 +1,6 @@ -[get-valid-endpoints] - +[get-valid-endpoints-500] +; usage: no arguments, returns DIALGROUP object of registered and valid 050x endpoints exten => s,1,Verbose(5, Entering get-valid-endpoints gosub.) - ; usage: no arguments, returns DIALGROUP object of registered and valid 050x endpoints same => n,Set(ENDPOINT_1_STATE=${DEVICE_STATE(PJSIP/0501)}) same => n,Set(ENDPOINT_2_STATE=${DEVICE_STATE(PJSIP/0502)}) same => n,Set(ENDPOINT_3_STATE=${DEVICE_STATE(PJSIP/0503)}) @@ -17,10 +16,11 @@ same => n,ExecIf($[${ENDPOINT_4_EXPR} = 0]?Set(DIALGROUP(CALL_VALID_LIST,add)=PJSIP/0504)) same => n,Return(${DIALGROUP(CALL_VALID_LIST)}) + [from-phone] exten => 0500,1,Verbose(5,${EXTEN}: Call all registered pjsips from ${CALLERID(num)}) - same => n,Gosub(get-valid-endpoints,s,1()) + same => n,Gosub(get-valid-endpoints-500,s,1()) same => n,Set(DIALGROUP(CALL_EVERYONE_LIST)=${GOSUB_RETVAL}) same => n,Set(DIALGROUP(CALL_EVERYONE_LIST,del)=PJSIP/${CALLERID(num)}) ; remove the caller same => n,Dial(${DIALGROUP(CALL_EVERYONE_LIST)}) @@ -39,15 +39,33 @@ same => n,Set(DIALSTATUS=CHANUNAVAIL) +[get-valid-endpoints-from-volte-ims] +; usage: no arguments, returns DIALGROUP object of registered and valid 050x endpoints +exten => s,1,Verbose(5, Entering get-valid-endpoints-500 gosub.) + same => n,Set(ENDPOINT_1_STATE=${DEVICE_STATE(PJSIP/0501)}) + same => n,Set(ENDPOINT_2_STATE=${DEVICE_STATE(PJSIP/0502)}) + same => n,Set(ENDPOINT_3_STATE=${DEVICE_STATE(PJSIP/0503)}) + same => n,Set(ENDPOINT_4_STATE=${DEVICE_STATE(PJSIP/0504)}) + same => n,Set(ENDPOINT_1_EXPR=$[$["${ENDPOINT_1_STATE}" = "NOT_INUSE"] | $["${ENDPOINT_1_STATE}" = "ONHOLD"]]) + same => n,Set(ENDPOINT_2_EXPR=$[$["${ENDPOINT_2_STATE}" = "NOT_INUSE"] | $["${ENDPOINT_2_STATE}" = "ONHOLD"]]) + same => n,Set(ENDPOINT_3_EXPR=$[$["${ENDPOINT_3_STATE}" = "NOT_INUSE"] | $["${ENDPOINT_3_STATE}" = "ONHOLD"]]) + same => n,Set(ENDPOINT_4_EXPR=$[$["${ENDPOINT_4_STATE}" = "NOT_INUSE"] | $["${ENDPOINT_4_STATE}" = "ONHOLD"]]) + same => n,Set(DIALGROUP(CALL_VALID_LIST)=) ; clear list + same => n,ExecIf($[${ENDPOINT_1_EXPR} != 0]?Set(DIALGROUP(CALL_VALID_LIST,add)=PJSIP/0501)) + same => n,ExecIf($[${ENDPOINT_2_EXPR} != 0]?Set(DIALGROUP(CALL_VALID_LIST,add)=PJSIP/0502)) + same => n,ExecIf($[${ENDPOINT_3_EXPR} != 0]?Set(DIALGROUP(CALL_VALID_LIST,add)=PJSIP/0503)) + same => n,ExecIf($[${ENDPOINT_4_EXPR} != 0]?Set(DIALGROUP(CALL_VALID_LIST,add)=PJSIP/0504)) + same => n,Return(${DIALGROUP(CALL_VALID_LIST)}) + + [volte_ims] exten => _.!,1,Verbose(5,${EXTEN}: Call internal number from ${CALLERID(num)}) same => n,Set(GROUP()=IMSgroup) same => n,GotoIf($[${GROUP_COUNT(IMSgroup)} > 1]?999) - same => n,WaitForPrecondition(10,2000); - same => n,Gosub(get-valid-endpoints,s,1()) + same => n,Gosub(get-valid-endpoints-from-volte-ims,s,1()) same => n,Set(DIALGROUP(CALL_EVERYONE_LIST)=${GOSUB_RETVAL}) - same => n,Set(DIALGROUP(CALL_EVERYONE_LIST,del)=PJSIP/${CALLERID(num)}) ; remove the caller + same => n,WaitForPrecondition(10,2000) same => n,Dial(${DIALGROUP(CALL_EVERYONE_LIST)}) same => n,Hangup(16) same => 999,Verbose(1,${EXTEN}: VoLTE client already busy (${GROUP_COUNT(IMSgroup)}) rejecting call from IMS ${CALLERID(num)}) -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37494?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Id9e3ead6e28a53793c6cceb6f23d5e6d987521d8 Gerrit-Change-Number: 37494 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-asterisk: extensions.conf: Reject calls if all SIP UAs busy in ...
by pespin 16 Jul '24

16 Jul '24
Attention is currently required from: Hoernchen. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37494?usp=email ) Change subject: ttcn3-asterisk: extensions.conf: Reject calls if all SIP UAs busy in call ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37494?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Id9e3ead6e28a53793c6cceb6f23d5e6d987521d8 Gerrit-Change-Number: 37494 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 Jul 2024 17:39:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-asterisk: extensions.conf: Reject subsequent MO/MT calls in VoL...
by pespin 16 Jul '24

16 Jul '24
Attention is currently required from: Hoernchen, jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37477?usp=email ) Change subject: ttcn3-asterisk: extensions.conf: Reject subsequent MO/MT calls in VoLTE when busy ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37477?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If4ce1fee36e51ac72681ac2ce04531d501ccb56c Gerrit-Change-Number: 37477 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 16 Jul 2024 17:39:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-iuh[master]: ranap_cn_rx_co(): do not ranap_cn_rx_co_free() on error
by laforge 16 Jul '24

16 Jul '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/37414?usp=email ) Change subject: ranap_cn_rx_co(): do not ranap_cn_rx_co_free() on error ...................................................................... ranap_cn_rx_co(): do not ranap_cn_rx_co_free() on error When ranap_cn_rx_co_decode2() returns an error, we should not call ranap_cn_rx_co_free(). It results in logging DRANAP INFO Freeing RANAP Procedure unknown 0x0 (CO) from RNC not implemented Change the function flow to early-exit pattern to skip ranap_cn_rx_co_free() on error. Change-Id: If7545f91c69f06bc32c55cab7dcfcad8350b0473 --- M src/ranap_common_cn.c 1 file changed, 23 insertions(+), 6 deletions(-) Approvals: daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index 81dcdca..8d0cc0c 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -414,16 +414,16 @@ int rc; rc = ranap_cn_rx_co_decode2(&message, data, len); - - if (rc == 0) - (*cb)(priv, &message); - else + if (rc) { LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_co() due to rc=%d\n", rc); + return rc; + } + + (*cb)(priv, &message); /* Free the asn1 structs in message */ ranap_cn_rx_co_free(&message); - - return rc; + return 0; } static int cn_ranap_rx_initiating_msg_cl(RANAP_InitiatingMessage_t *imsg, ranap_message *message) -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/37414?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: If7545f91c69f06bc32c55cab7dcfcad8350b0473 Gerrit-Change-Number: 37414 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-iuh[master]: ranap_cn_rx_co(): do not ranap_cn_rx_co_free() on error
by laforge 16 Jul '24

16 Jul '24
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/37414?usp=email ) Change subject: ranap_cn_rx_co(): do not ranap_cn_rx_co_free() on error ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/37414?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: If7545f91c69f06bc32c55cab7dcfcad8350b0473 Gerrit-Change-Number: 37414 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 Jul 2024 17:01:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-iuh[master]: fix memleak: free after aper_decode() also on error
by laforge 16 Jul '24

16 Jul '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/37413?usp=email ) Change subject: fix memleak: free after aper_decode() also on error ...................................................................... fix memleak: free after aper_decode() also on error It turns out that aper_decode() wants the caller to ASN_STRUCT_FREE() always, also even when it returned != RC_OK. When during a test I was feeding random data (a BSSMAP message) to ranap_cn_rx_co_decode2(), I ended up with ASAN indicating a memory leak: ``` pkt DEBUG packet.1 RANAP 01 00 03 05 18 01 (decode_iu.c:658) tag ERROR Error in RANAP ASN.1 decode (ranap_common_cn.c:401) tag ERROR Not calling cn_ranap_handle_co() due to rc=-1 (ranap_common_cn.c:428) pkt ERROR packet.1 RANAP failed to decode RANAP data (decode_iu.c:668) ================================================================= ==1920572==ERROR: LeakSanitizer: detected memory leaks Direct leak of 208 byte(s) in 1 object(s) allocated from: #0 0x7f34520f3bc7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f34526ccddd (/lib/x86_64-linux-gnu/libtalloc.so.2+0x5ddd) (BuildId: 75c550e5dc091c77e1159c52b284f34d0c4d92cd) Indirect leak of 102 byte(s) in 1 object(s) allocated from: #0 0x7f34520f3bc7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f34526ccddd (/lib/x86_64-linux-gnu/libtalloc.so.2+0x5ddd) (BuildId: 75c550e5dc091c77e1159c52b284f34d0c4d92cd) SUMMARY: AddressSanitizer: 310 byte(s) leaked in 2 allocation(s). ``` With this patch, the leak is gone. Change-Id: I03ed2376e520ec6dbcc2bae22f9291e211c7cca9 --- M src/ranap_common_cn.c 1 file changed, 43 insertions(+), 2 deletions(-) Approvals: daniel: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c index 72698a4..81dcdca 100644 --- a/src/ranap_common_cn.c +++ b/src/ranap_common_cn.c @@ -387,13 +387,15 @@ dec_ret = aper_decode(NULL, &asn_DEF_RANAP_RANAP_PDU, (void **)&pdu, data, len, 0, 0); if (dec_ret.code != RC_OK) { LOGP(DRANAP, LOGL_ERROR, "Error in RANAP ASN.1 decode\n"); - return -1; + rc = -1; + goto error_free; } message->direction = pdu->present; rc = _cn_ranap_rx_co(pdu, message); +error_free: ASN_STRUCT_FREE(asn_DEF_RANAP_RANAP_PDU, pdu); return rc; @@ -633,13 +635,15 @@ dec_ret = aper_decode(NULL, &asn_DEF_RANAP_RANAP_PDU, (void **)&pdu, data, len, 0, 0); if (dec_ret.code != RC_OK) { LOGP(DRANAP, LOGL_ERROR, "Error in RANAP ASN.1 decode\n"); - return -1; + rc = -1; + goto error_free; } message->direction = pdu->present; rc = _cn_ranap_rx_cl(pdu, message); +error_free: ASN_STRUCT_FREE(asn_DEF_RANAP_RANAP_PDU, pdu); return rc; -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/37413?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I03ed2376e520ec6dbcc2bae22f9291e211c7cca9 Gerrit-Change-Number: 37413 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in pysim[master]: pySim.esim.http_json_api: 'header' is not always present in response
by laforge 16 Jul '24

16 Jul '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37496?usp=email ) Change subject: pySim.esim.http_json_api: 'header' is not always present in response ...................................................................... pySim.esim.http_json_api: 'header' is not always present in response For example, the ES9+ handleNotification function is defined with an empty response body, so we cannot unconditionally assume that every HTTP response will contain a JSON "header" value. Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b --- M pySim/esim/http_json_api.py 1 file changed, 26 insertions(+), 10 deletions(-) Approvals: dexter: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py index 377faea..6a803f2 100644 --- a/pySim/esim/http_json_api.py +++ b/pySim/esim/http_json_api.py @@ -204,16 +204,17 @@ return output def decode(self, data: dict) -> dict: - """[further] Decode and validate the JSON-Dict of the respnse body.""" + """[further] Decode and validate the JSON-Dict of the response body.""" output = {} - # let's first do the header, it's special - if not 'header' in data: - raise ValueError('Mandatory output parameter "header" missing') - hdr_class = self.output_params.get('header') - output['header'] = hdr_class.decode(data['header']) + if 'header' in self.output_params: + # let's first do the header, it's special + if not 'header' in data: + raise ValueError('Mandatory output parameter "header" missing') + hdr_class = self.output_params.get('header') + output['header'] = hdr_class.decode(data['header']) - if output['header']['functionExecutionStatus']['status'] not in ['Executed-Success','Executed-WithWarning']: - raise ApiError(output['header']['functionExecutionStatus']) + if output['header']['functionExecutionStatus']['status'] not in ['Executed-Success','Executed-WithWarning']: + raise ApiError(output['header']['functionExecutionStatus']) # we can only expect mandatory parameters to be present in case of successful execution for p in self.output_mandatory: if p == 'header': @@ -229,7 +230,7 @@ output[p] = p_class.decode(v) return output - def call(self, data: dict, func_call_id: Optional[str] = None, timeout=10) -> dict: + def call(self, data: dict, func_call_id: Optional[str] = None, timeout=10) -> Optional[dict]: """Make an API call to the HTTP API endpoint represented by this object. Input data is passed in `data` as json-serializable dict. Output data is returned as json-deserialized dict.""" @@ -253,4 +254,6 @@ if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'): raise HttpHeaderError(response) - return self.decode(response.json()) + if response.content: + return self.decode(response.json()) + return None -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37496?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b Gerrit-Change-Number: 37496 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in pysim[master]: pySim.esim.http_json_api: 'header' is not always present in response
by laforge 16 Jul '24

16 Jul '24
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37496?usp=email ) Change subject: pySim.esim.http_json_api: 'header' is not always present in response ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37496?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b Gerrit-Change-Number: 37496 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 16 Jul 2024 16:58:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim.esim.http_json_api: 'header' is not always present in response
by dexter 16 Jul '24

16 Jul '24
Attention is currently required from: laforge. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37496?usp=email ) Change subject: pySim.esim.http_json_api: 'header' is not always present in response ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37496?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b Gerrit-Change-Number: 37496 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 16 Jul 2024 15:39:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.