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

April 2024

  • 1 participants
  • 1128 discussions
[L] Change in osmo-mgw[master]: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io
by laforge 02 Apr '24

02 Apr '24
Attention is currently required from: dexter, fixeria, jolly, neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email ) Change subject: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io ...................................................................... Patch Set 5: (3 comments) File include/osmocom/mgcp/mgcp.h: https://gerrit.osmocom.org/c/osmo-mgw/+/36363/comment/b9ee7d52_bf65578c PS5, Line 4: * > maybe time to bump the (C) ok, will do - but onlyin the C files where I'm actually adding code. The change here in the mgcp.h file is too minor for claiming copyright. File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/36363/comment/e8161eee_ee547078 PS5, Line 1044: c > typo Done https://gerrit.osmocom.org/c/osmo-mgw/+/36363/comment/e4e096a3_d2d8b7a9 PS5, Line 1598: NOTICE > ERROR? Done -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8471960d5d8088a70cf105f2f40dfa5d5458169a Gerrit-Change-Number: 36363 Gerrit-PatchSet: 5 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: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 17:40:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-mgw[master]: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io
by laforge 02 Apr '24

02 Apr '24
Attention is currently required from: dexter, fixeria, jolly, laforge, neels, pespin. Hello Jenkins Builder, dexter, fixeria, jolly, neels, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Code-Review+1 by jolly, Code-Review+1 by neels, Code-Review+1 by pespin, Verified+1 by Jenkins Builder Change subject: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io ...................................................................... Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io Converting from osmo_fd to osmo_io allows us to switch to the new io_uring backend and benefit from related performance benefits. In a benchmark running 200 concurrent bi-directional voice calls with GSM-EFR codec, I am observing: * the code before this patch uses 40..42% of a single core on a Ryzen 5950X at 200 calls (=> 200 endpoints with each two connections) * no increase in CPU utilization before/after this patch, i.e. the osmo_io overhead for the osmo_fd backend is insignificant compared to the direct osmo_fd mode before * an almost exactly 50% reduction of CPU utilization when running the same osmo-mgw build with LIBOSMO_IO_BACKEND=IO_URING - top shows 19..21% for the same workload instead of 40..42% with the OSMO_FD default backend. * An increase of about 4 Megabytes in both RSS and VIRT size when enabling the OSMO_IO backend. This is likely the memory-mapped rings. No memory leakage is observed when using either of the backends. Change-Id: I8471960d5d8088a70cf105f2f40dfa5d5458169a --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_network.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_iuup.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M tests/mgcp/mgcp_test.c 7 files changed, 236 insertions(+), 169 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/63/36363/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8471960d5d8088a70cf105f2f40dfa5d5458169a Gerrit-Change-Number: 36363 Gerrit-PatchSet: 6 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: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-mgw[master]: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io
by neels 02 Apr '24

02 Apr '24
Attention is currently required from: dexter, fixeria, laforge, pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email ) Change subject: Convert RTP/RTCP/OSMUX I/O from osmo_fd to osmo_io ...................................................................... Patch Set 5: (1 comment) File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/36363/comment/a16ed713_0b0deee4 PS4, Line 1047: * \param[in] msg message buffer that holds the data to be send. > > What works quite well is to put a msgb in OTC_SELECT ... […] gotcha, but i think i did decide to do so once, because it's a powerful pattern, i think it was libosmo-pfcp -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8471960d5d8088a70cf105f2f40dfa5d5458169a Gerrit-Change-Number: 36363 Gerrit-PatchSet: 5 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: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 16:17:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: Allow API users to enable/disable SSL
by pespin 02 Apr '24

02 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email ) Change subject: HTTP_Adapter: Allow API users to enable/disable SSL ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506/comment/cd0174c5_5b98… PS1, Line 27: function f_http_init(charstring host, integer http_port, boolean use_ssl := false) runs on http_CT { At this rate, it Probably makes sense to have a separate record with all the config parameters, and have a template/function to initialize the record, then pass the record here at init. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6487deea50cd9b4ed4905d9a3a78e00def8ea319 Gerrit-Change-Number: 36506 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:40:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow body to be "omit"
by pespin 02 Apr '24

02 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email ) Change subject: HTTP_Adapter: allow body to be "omit" ...................................................................... Patch Set 1: Code-Review-1 (2 comments) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/cd7842d5_335a… PS1, Line 85: msg.request := { I'm not really liking this kind of functions you are adding here and in previous messages, it differs to existing ttcn3 code we use and write everywhere. I see no need to have a function here, I bet it can be done with a template. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/d6447551_c530… PS1, Line 148: template charstring body := omit, template HTTPMessage exp := tr_HTTP_Resp2xx, this is most probably a "template (omit) charstring body". -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff Gerrit-Change-Number: 36505 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:38:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow API users to specifiy custom header
by pespin 02 Apr '24

02 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504?usp=email ) Change subject: HTTP_Adapter: allow API users to specifiy custom header ...................................................................... Patch Set 1: (4 comments) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/fa87a4c6_ed62… PS1, Line 41: function ts_HTTP_Header(template charstring body := omit, I'd prefer having this one prefixed "f_ts_", since it's actually a function. Furthermore, this is a ts_ template, so it makes no sense to receive a "template charstring". It should be at least "template (omit) charstring". https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/c144563b_a13d… PS1, Line 42: template charstring host := omit, template (omit) charstring https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/79f1158b_02fe… PS1, Line 55: if (ispresent(body)) { I'm not sure ispresent() can be used this way, or only for optional fields in a record. You probably need "istemplatekind". Make sure ispresent() doesn't return always true here. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/0d028e9e_752b… PS1, Line 59: /* Add custom header lines, already existing headers (name) are updated */ I think it makes sense to move this to a separate function "merge_headers()" or "overlay_headers()". This way the test can also simply get the regular header and call that function. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I115fd14254e0957c0955649aeb47059dc180bf57 Gerrit-Change-Number: 36504 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:35:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: add HOST field to header lines.
by pespin 02 Apr '24

02 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36503?usp=email ) Change subject: HTTP_Adapter: add HOST field to header lines. ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36503?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id4b2220da4b2b5fbe74cdc2776cf66d6b34ddbcf Gerrit-Change-Number: 36503 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:26:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: msc: fix race condition in TC_mm_id_resp_no_identity
by pespin 02 Apr '24

02 Apr '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36502?usp=email ) Change subject: msc: fix race condition in TC_mm_id_resp_no_identity ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36502?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d2b5d49df8f7ae1eb12fc137f4256fe6fab9117 Gerrit-Change-Number: 36502 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:24:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: IPAd_Tests: add testsuite for an IPAd
by Jenkins Builder 02 Apr '24

02 Apr '24
Attention is currently required from: fixeria, pespin. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229?usp=email ) Change subject: IPAd_Tests: add testsuite for an IPAd ...................................................................... Patch Set 2: (13 comments) File ipad/example_ca/pki/certs_by_serial/11192A13CF3A3BC43FE1594BA8567DF0.pem: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/3c2b16e3_8743… PS2, Line 36: X509v3 Basic Constraints: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/db33ca48_1211… PS2, Line 38: X509v3 Subject Key Identifier: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/f9b9c8e9_8432… PS2, Line 40: X509v3 Authority Key Identifier: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/1316252e_4e71… PS2, Line 45: X509v3 Extended Key Usage: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/c388ae46_2018… PS2, Line 47: X509v3 Key Usage: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/a912d025_4a9b… PS2, Line 49: X509v3 Subject Alternative Name: trailing whitespace File ipad/example_ca/pki/issued/alttest.crt: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/fb1c5389_b62f… PS2, Line 36: X509v3 Basic Constraints: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/ce983c85_69a1… PS2, Line 38: X509v3 Subject Key Identifier: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/f2e9c9cc_3e55… PS2, Line 40: X509v3 Authority Key Identifier: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/88b3d449_8b78… PS2, Line 45: X509v3 Extended Key Usage: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/579ed89c_ea7b… PS2, Line 47: X509v3 Key Usage: trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/4e767527_7c73… PS2, Line 49: X509v3 Subject Alternative Name: trailing whitespace File ipad/example_ca/vars: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15516): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/d6e62e11_9e47… PS2, Line 30: # trailing whitespace -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic9ea8c69e56a2e8ddf0f506861ece6d40cbcb06d Gerrit-Change-Number: 36229 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Apr 2024 15:07:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow body to be "omit"
by dexter 02 Apr '24

02 Apr '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email ) Change subject: HTTP_Adapter: allow body to be "omit" ...................................................................... HTTP_Adapter: allow body to be "omit" In HTTP not all requests have a body. At the moment we describe a missing body with body := "". This is not 100% correct since the rest of the code interprets this as a present body with zero length and will put a content_length = 0 header line into the HTTP header, even in the GET request. This will most likely be ignored by any HTTP server, but it is still not 100% spec compliant. Related: SYS#6824 Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff --- M library/HTTP_Adapter.ttcn 1 file changed, 38 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/36505/1 diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn index 879313d..968b44f 100644 --- a/library/HTTP_Adapter.ttcn +++ b/library/HTTP_Adapter.ttcn @@ -73,21 +73,31 @@ return hdr; } -template (value) HTTPMessage ts_HTTP_Req(charstring url, - charstring method := "GET", - charstring body := "", - integer v_maj := 1, integer v_min := 1, - charstring host, - HeaderLines custom_hdr := { }) := { - request := { +function ts_HTTP_Req(charstring url, + charstring method := "GET", + template charstring body := omit, + integer v_maj := 1, integer v_min := 1, + charstring host, + HeaderLines custom_hdr := { }) +return template (value) HTTPMessage { + var HTTPMessage msg; + + msg.request := { client_id := omit, method := method, uri := url, version_major := v_maj, version_minor := v_min, - header := valueof(ts_HTTP_Header(body, host, custom_hdr)), - body := body + header := valueof(ts_HTTP_Header(body, host, custom_hdr)) } + + if (ispresent(body)) { + msg.request.body := valueof(body); + } else { + msg.request.body := ""; + } + + return msg; } template HTTPMessage tr_HTTP_Resp(template integer sts := ?) := { @@ -104,7 +114,7 @@ template HTTPMessage tr_HTTP_Resp2xx := tr_HTTP_Resp((200..299)); -function f_http_tx_request(charstring url, charstring method := "GET", charstring body := "", +function f_http_tx_request(charstring url, charstring method := "GET", template charstring body := omit, HeaderLines custom_hdr := { }) runs on http_CT { HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port)); @@ -135,7 +145,7 @@ /* run a HTTP request and return the response */ function f_http_transact(charstring url, charstring method := "GET", - charstring body := "", template HTTPMessage exp := tr_HTTP_Resp2xx, + template charstring body := omit, template HTTPMessage exp := tr_HTTP_Resp2xx, float tout := 2.0, HeaderLines custom_hdr := { }) runs on http_CT return HTTPMessage { f_http_tx_request(url, method, body, custom_hdr); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff Gerrit-Change-Number: 36505 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.