Module: kamailio
Branch: master
Commit: ac64b4d347d44102ffbcf14c7ad0c791d1f85cfc
URL:
https://github.com/kamailio/kamailio/commit/ac64b4d347d44102ffbcf14c7ad0c79…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2016-06-07T08:37:50+02:00
httpapitest Fixing test function
---
Modified: test/mod_httpapitest/httpapitest.c
Modified: test/mod_httpapitest/test/curlapi.cfg
---
Diff:
https://github.com/kamailio/kamailio/commit/ac64b4d347d44102ffbcf14c7ad0c79…
Patch:
https://github.com/kamailio/kamailio/commit/ac64b4d347d44102ffbcf14c7ad0c79…
---
diff --git a/test/mod_httpapitest/httpapitest.c b/test/mod_httpapitest/httpapitest.c
index 0b68953..e9ee538 100644
--- a/test/mod_httpapitest/httpapitest.c
+++ b/test/mod_httpapitest/httpapitest.c
@@ -55,7 +55,7 @@ static int w_testcurl_connect(struct sip_msg* _m, char* _con, char *
_url, char*
/* Exported functions */
static cmd_export_t cmds[] = {
- {"test_http_connect", (cmd_function)w_testcurl_connect, 2,
fixup_testcurl_connect,
+ {"test_http_connect", (cmd_function)w_testcurl_connect, 3,
fixup_testcurl_connect,
fixup_free_testcurl_connect,
REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
};
diff --git a/test/mod_httpapitest/test/curlapi.cfg
b/test/mod_httpapitest/test/curlapi.cfg
index 6082c70..2dc29ab 100644
--- a/test/mod_httpapitest/test/curlapi.cfg
+++ b/test/mod_httpapitest/test/curlapi.cfg
@@ -18,16 +18,15 @@ loadmodule "xlog.so" # For extended logging with
pseudovariables
loadmodule "kex.so" # Kamailio extensions:
# Script flags and basic mi commands (version, pwd, get_statistics)
#
-loadmodule "tm.so" # Transactions are needed in order to fork
-loadmodule "tmx.so" # Kamailio extras to TM
#
loadmodule "sl.so" # Stateless replies - needed by registrar.so
loadmodule "rtimer.so" # For ticks
loadmodule "htable.so" # For init event route
-loadmodule "http_client.so" # THe CURL module
-loadmodule "httpapitest.so" # THe CURL module
loadmodule "cfgutils.so" # Memory debugging
+loadmodule "http_client.so" # The HTTP client module
+loadmodule "httpapitest.so" # The HTTP client API test module -using the API
to http_client.so
+
# main routing logic
modparam("http_client", "connection_timeout", 42);
@@ -48,11 +47,6 @@ onreply_route {
xlog("L_INFO", "<-- Incoming response: $rs $rr - from $si\n");
}
-branch_route[BRANCH_ROUTE]
-{
- xlog("L_INFO", " --> Outgoing branch $T_branch_idx : $rm from $si
to $ru \n");
-}
-
onsend_route
{
xlog("ONSEND --> Sending from $sndfrom(proto):$sndfrom(ip):$sndfrom(port) to
$sndto(proto):$sndto(ip):$sndto(port) \n");
@@ -63,7 +57,7 @@ event_route[htable:mod-init]
{
xlog("L_ERR", "### Kamailio starting $timef(HH:mm) \n");
$avp(gurka) = "";
- $var(res) = http_connect("lisa", "", "$avp(gurka)");
+ $var(res) = test_http_connect("lisa", "", "$avp(gurka)");
xlog("L_ERR", "-- Lisa http_client connection: $avp(gurka) Result
$var(res)\n");