### Description
1. Added 3 gateways to the dispatcher list file:
```
1 sip:naptr.mydomain.net 0 0
2 sip:srv.mydomain.net 0 0
```
started kamailio and ran: ```kamcmd dispatcher.list```
Output: ```error: 500 - No Destination Sets```
If I append to the list, one gateway which resolves to an A record (or an IP:PORT format) like e.g.:
```3 sip:a.mydomain.net:5060 0 0```, it shows up in the dispatcher list just fine:
```
{
NRSETS: 1
RECORDS: {
SET: {
ID: 3
TARGETS: {
DEST: {
URI: sip:a.mydomain.net:5060
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 14.642
STD: 0.05
EST: 15.0345
MAX: 25.452
TIMEOUT: 0
}
}
}
}
}
}
```
I also verified the DNS resolution with: ```kamcmd dns.lookup naptr naptr.mydomain.net``` and ```kamcmd dns.lookup srv srv.mydomain.net``` which was perfectly as expected.
Since I wasn't even able to see a dispatcher loaded, there was no operation that I could do to it to set it to active or anything else.
A network trace just shows A record queries to all gateways with no success on those which have NAPTR/SRV records.
#### Reproduction
100% reproducible with the description above.
### Additional Information
Tested on Kamailio version 4.4.5 and 5.1.1 with the following detailed version info:
```
version: kamailio 5.1.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
compiled with /usr/bin/gcc 4.1.2
```
--
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/1743
<!-- Kamailio Pull Request Template -->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
added a new function as get_regsub_string for getting substring with regular expression
-regexec() function with REG_EXTENDED flags is used
-setting variable as result
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1733
-- Commit Summary --
* textops : added a new function for getting substring with regular expression
* textops: doc is added for get_regsub_string
-- File Changes --
M src/modules/textops/doc/textops_admin.xml (147)
M src/modules/textops/textops.c (122)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1733.patchhttps://github.com/kamailio/kamailio/pull/1733.diff
--
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/pull/1733
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1739
-- Commit Summary --
* Add files via upload
* Merge pull request #1 from thulasizwe-n/thulasizwe-n-patch-1
* fixed possible list corruption
* cdp -- lockup fix
-- File Changes --
A modules/routing.c (299)
A msrp_env.c (226)
A msrp_mod.c (505)
A msrp_netio.c (453)
A msrp_netio.h (42)
A msrp_options.c (75)
A msrp_options.h (21)
A ro_session_hash.h (244)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1739.patchhttps://github.com/kamailio/kamailio/pull/1739.diff
--
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/pull/1739
…ailio/kamailio/issues/1681
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1706
-- Commit Summary --
* Allow startup with offline database. See issue https://github.com/kamailio/kamailio/issues/1681
-- File Changes --
M src/modules/sqlops/README (25)
M src/modules/sqlops/sqlops.c (34)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1706.patchhttps://github.com/kamailio/kamailio/pull/1706.diff
--
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/pull/1706
Module: kamailio
Branch: master
Commit: 1b014d65e26a99f9f5d4aea1b27949776f083c2d
URL: https://github.com/kamailio/kamailio/commit/1b014d65e26a99f9f5d4aea1b279497…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-30T09:19:16+01:00
lib/srdb1: memset db connection structure earlier in db_bind_mod()
---
Modified: src/lib/srdb1/db.c
---
Diff: https://github.com/kamailio/kamailio/commit/1b014d65e26a99f9f5d4aea1b279497…
Patch: https://github.com/kamailio/kamailio/commit/1b014d65e26a99f9f5d4aea1b279497…
---
diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c
index 4a250bc819..7d53f70361 100644
--- a/src/lib/srdb1/db.c
+++ b/src/lib/srdb1/db.c
@@ -163,6 +163,12 @@ int db_bind_mod(const str* mod, db_func_t* mydbf)
LM_CRIT("null dbf parameter\n");
return -1;
}
+
+ /* for safety we initialize mydbf with 0 (this will cause
+ * a segfault immediately if someone tries to call a function
+ * from it without checking the return code from bind_dbmod */
+ memset((void*)mydbf, 0, sizeof(db_func_t));
+
if (mod->len > MAX_URL_LENGTH)
{
LM_ERR("SQL URL too long\n");
@@ -178,11 +184,6 @@ int db_bind_mod(const str* mod, db_func_t* mydbf)
memcpy(name+3, mod->s, mod->len);
name[mod->len+3] = 0;
- /* for safety we initialize mydbf with 0 (this will cause
- * a segfault immediately if someone tries to call a function
- * from it without checking the return code from bind_dbmod */
- memset((void*)mydbf, 0, sizeof(db_func_t));
-
p = strchr(name, ':');
if (p) {
len = p - name;