Function "tcp_get_conid" from tcpops module does not write the conid into target variable
I followed the documentation on https://www.kamailio.org/docs/modules/devel/modules/tcpops.html#tcpops.f.tc…
And with debug enabled, you see the connection is found:
`Jun 30 14:13:47 kamailio-dev-2 /usr/sbin/kamailio[121285]: DEBUG: <core> [core/tcp_main.c:1670]: _tcpconn_find(): found connection by peer address (id: 14)`
But the given variable $var(conid) is always empty.
After a lookup("location") the code is like:
```
if(tcp_get_conid("$dd:$dp", "$var(conid)")) {
xlog("connection id is: $var(conid)\n");
}
```
But the given variable $var(conid) is always empty.
Version used: kamailio 5.3.5 (x86_64/linux)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2382
Module: kamailio
Branch: master
Commit: 0780e781c319254307c85bd873c58c6478a28da8
URL: https://github.com/kamailio/kamailio/commit/0780e781c319254307c85bd873c58c6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-07-03T08:33:13+02:00
lib/srdb1: init timeval structs to silent analyzer
---
Modified: src/lib/srdb1/db_query.c
---
Diff: https://github.com/kamailio/kamailio/commit/0780e781c319254307c85bd873c58c6…
Patch: https://github.com/kamailio/kamailio/commit/0780e781c319254307c85bd873c58c6…
---
diff --git a/src/lib/srdb1/db_query.c b/src/lib/srdb1/db_query.c
index d2319446a6..4a5cd63e22 100644
--- a/src/lib/srdb1/db_query.c
+++ b/src/lib/srdb1/db_query.c
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -46,7 +46,7 @@ static inline int db_do_submit_query(const db1_con_t* _h, const str *_query,
int (*submit_query)(const db1_con_t*, const str*))
{
int ret;
- struct timeval tvb, tve;
+ struct timeval tvb = {0}, tve = {0};
struct timezone tz;
unsigned int tdiff;
Dev-Ops VoIP & Kamailio
GILAWA is looking for a new colleague to join our team!
Tasks:
Deploying, developing, and integrating our software based on Kamailio
Testing and validation of our customer solutions
Solve complex customer problems in the VoIP field
Fix Bugs and create extensions in the Kamailio project
Requirements:
Good background in VoIP telephony and Kamailio Stack
Experience with signalling standards (SIP, RTP etc..) and troubleshooting
Knowledge and experience in one of the following languages: C/C++, Bash, PHP
Experience with Debian or RedHat/CentOS Linux, knowledge of Ansible would be a plus
Fluent in English
Based in European or neighbouring time zone (e.g. EMEA area)
Self-organized and strong communication skills
Given the current situation this is a remote position.
If you are interested, please send me a (direct) e-mail with an CV or Linkedin link, please include your availability and salary expectations as well.
Best regards,
Henning Westerholt
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>