Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: Make timeout configurable

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Feb 22 09:26:30 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23020 )


Change subject: HTTP_Adapter: Make timeout configurable
......................................................................

HTTP_Adapter: Make timeout configurable

Change-Id: Icdcba367dc12c0f20a733572da250d7db22c03ee
---
M library/HTTP_Adapter.ttcn
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/23020/1

diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn
index a9d0d83..03de1f3 100644
--- a/library/HTTP_Adapter.ttcn
+++ b/library/HTTP_Adapter.ttcn
@@ -73,10 +73,11 @@
 
 /* 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)
+			 charstring body := "", template HTTPMessage exp := tr_HTTP_Resp2xx,
+			 float tout := 2.0)
 runs on http_CT return HTTPMessage {
 	var HTTPMessage resp;
-	timer T := 2.0;
+	timer T := tout;
 
 	HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port));
 	//HTTP.receive(Connect_result:?);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23020
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: Icdcba367dc12c0f20a733572da250d7db22c03ee
Gerrit-Change-Number: 23020
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210222/6cb0c84e/attachment.htm>


More information about the gerrit-log mailing list