Module: sip-router
Branch: master
Commit: c4f7356f2d8c057f59cb61948aa04664cecd35f7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c4f7356…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 30 17:53:44 2014 +0200
core: exit with -1 if there is a mismatch in version of module and core
- return code to shell 0 is like succesful run, some scripts not being
able to say it was …
[View More]a failure to start
---
sr_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sr_module.c b/sr_module.c
index b581635..e1c1797 100644
--- a/sr_module.c
+++ b/sr_module.c
@@ -610,7 +610,7 @@ reload:
}
/* version control */
if (!version_control(handle, path)) {
- exit(0);
+ exit(-1);
}
mod_if_ver = (unsigned *)dlsym(handle,
DLSYM_PREFIX "module_interface_ver");
[View Less]
Module: sip-router
Branch: master
Commit: fad3b2482f98888351f4133f47a433b5bb36c3b7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fad3b24…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 30 17:37:50 2014 +0200
test/unit: README updated with more details about running unit tests
---
test/unit/README | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 …
[View More]deletions(-)
diff --git a/test/unit/README b/test/unit/README
index d6735f4..85c5776 100644
--- a/test/unit/README
+++ b/test/unit/README
@@ -1,7 +1,11 @@
+Kamailio Test Unit
+==================
+
This directory contains some small "smoke tests", that should assure that
basic functionality of the server work as required. This tests should consists
of one shell script and a config file if needed. They should not need much time
for execution, to allow the run of the complete test suite in a few seconds.
+
All test scripts must be self-contained, should not have external dependencies
and must clean up after they are run. The second line in each scripts should
contain a small comment that describe the task of the test, it should not
@@ -10,3 +14,18 @@ output any messages on successful runs.
This tests should (in the current state) only run by developers who know
what they do. They could delete your database, produce core dumps that fill
your harddisk or do other nasty things..
+
+Usage
+-----
+
+To execute all unit tests, run:
+
+ make all
+
+To run a specific unit test, run:
+
+ make run UNIT=scripname
+
+Scriptname is the name of shell file to execute, for example:
+
+ make run UNIT=1.sh
[View Less]
Hi,
I am currently trying to understand some kamailio code and came across
this construct inside do_forward_reply() function (code in italics is
not part of upstream kamailio):
*do_forward_reply(struct sip_msg* msg, int mode){*
...
...
apply_force_send_socket(&dst, msg);
if (msg_send(&dst, new_buf, new_len)<0)
{
STATS_RPL_FWD_DROP();
goto error;
}
/* ...
dst.send_sock=get_send_socket(msg, &dst.to, dst.proto);
...
…
[View More] run_onsend(msg, &dst, new_buf, new_len);*/
*}*
Is there really a sense in calling run_onsend() after the msg_send()
function? In my understanding (based on onsend_route uasge) run_onsend()
is used to make some last minute changes before a message is sent to a
destination.
Thank you,
Lucian Balaceanu
[View Less]