Hello,
looking a bit over our makefiles, I am thinking of simplifying some
parts related to compiler optimizations, as I noticed some of them are
for gcc 2.x. So I would like to see if people are still using old OSes
and/or old GCC versions.
In other words, if you use old or some dedicated systems and plan to
deploy most recent Kamailio versions, reply here with the gcc version in
use, particularly interested to see the use of gcc 2.x or 3.x.
The idea is not to remove the support for it completely, but to simply
and don't try to find all tunings for old versions, but go more with the
default gcc options.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.comhttp://miconda.eu
Since upgrading from 433 to 434 I'm seeing a crash when calling send() from the corex module The backtrace is included below
It looks like the problem was introduced in 027495fb (cherry picked into 43: 4fdd1169, 42: 5b93cc21 and 41: 8e010d9f)
I can confirm that 434 with 4fdd1169 reverted doesn't crash
#0 memchr () at /sysdeps/x86_64/memchrS:33
33 /sysdeps/x86_64/memchrS: No such file or directory
(gdb) bt
#0 memchr () at /sysdeps/x86_64/memchrS:33
#1 0x00007f477b6eb50d in corex_send (msg=0x7f4780940508, pu=<optimized out>, proto=proto@entry=PROTO_UDP) at corex_libc:265
#2 0x00007f477b6edf3e in w_send (msg=<optimized out>, su=<optimized out>, sq=<optimized out>) at corex_modc:174
#3 0x0000000000429127 in do_action (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f47808553c8, msg=msg@entry=0x7f4780940508) at actionc:1059
#4 0x0000000000427dc9 in run_actions (h=h@entry=0x7ffe874baf10, a=0x7f47808553c8, msg=msg@entry=0x7f4780940508) at actionc:1548
#5 0x00000000004297fc in do_action (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f4780855ed8, msg=msg@entry=0x7f4780940508) at actionc:1048
#6 0x0000000000427dc9 in run_actions (h=h@entry=0x7ffe874baf10, a=0x7f4780855ed8, msg=msg@entry=0x7f4780940508) at actionc:1548
#7 0x00000000004297fc in do_action (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f4780856020, msg=msg@entry=0x7f4780940508) at actionc:1048
#8 0x0000000000427dc9 in run_actions (h=h@entry=0x7ffe874baf10, a=0x7f4780856020, msg=msg@entry=0x7f4780940508) at actionc:1548
#9 0x00000000004297fc in do_action (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f4780856248, msg=msg@entry=0x7f4780940508) at actionc:1048
#10 0x0000000000427dc9 in run_actions (h=h@entry=0x7ffe874baf10, a=0x7f478084bdb0, msg=msg@entry=0x7f4780940508) at actionc:1548
#11 0x00000000004298e5 in do_action (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f47808075e0, msg=msg@entry=0x7f4780940508) at actionc:677
#12 0x0000000000427dc9 in run_actions (h=h@entry=0x7ffe874baf10, a=a@entry=0x7f47808005f0, msg=msg@entry=0x7f4780940508) at actionc:1548
#13 0x0000000000434610 in run_top_route (a=0x7f47808005f0, msg=msg@entry=0x7f4780940508, c=c@entry=0x0) at actionc:1634
#14 0x00000000004f768e in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=<optimized out>) at receivec:196
#15 0x00000000005dee7d in udp_rcv_loop () at udp_serverc:495
#16 0x00000000004a8a43 in main_loop () at mainc:1577
#17 0x00000000004272e7 in main (argc=<optimized out>, argv=<optimized out>) at mainc:2553
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/496
I want to add a few columns to the ```subscriber``` table to simplify setting a few headers I also use ```is_subscriber``` in ```route[LOCATION]``` to only save MESSAGEs (msilo) for subscribers
When using is_subscriber with ```3``` set for the flag, Kamailio should include the domain in the check and according to the auth_db documentation, "the credentials are not loaded in variables"
However, Kamailio still attempts to lookup and store the credentials configured with ```modparam("auth_db", "load_credentials", "rpid")```
```
ERROR: *** cfgtrace:request_route=[LOCATION] c=[/etc/kamailio/kamailiocfg] l=1064 a=27 n=is_subscriber
DEBUG: auth_db [auth_db_modc:262]: w_is_subscriber(): uri [sip:86@examplecom] table [subscriber] flags [3]
DEBUG: db_postgres [km_valc:163]: db_postgres_val2str(): PQescapeStringConn: in: 2 chars, out: 2 chars
DEBUG: db_postgres [km_valc:163]: db_postgres_val2str(): PQescapeStringConn: in: 12 chars, out: 12 chars
DEBUG: db_postgres [km_dbasec:271]: db_postgres_submit_query(): sending query ok: 0x7fdf607ed268 (2) - [select rpid from subscriber where username='86' AND domain='examplecom']
DEBUG: <core> [db_resc:115]: db_new_result(): allocate 56 bytes for result set at 0x7fdf6089af20
DEBUG: db_postgres [km_dbasec:551]: db_postgres_store_result(): 0x7fdf607ed268 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x2860ad0)
DEBUG: db_postgres [km_resc:108]: db_postgres_get_columns(): 1 columns returned from the query
DEBUG: <core> [db_resc:152]: db_allocate_columns(): allocate 8 bytes for result names at 0x7fdf60864270
DEBUG: <core> [db_resc:163]: db_allocate_columns(): allocate 4 bytes for result types at 0x7fdf6074ad38
DEBUG: db_postgres [km_resc:125]: db_postgres_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7fdf60940270
DEBUG: db_postgres [km_resc:132]: db_postgres_get_columns(): RES_NAMES(0x7fdf60940270)[0]=[rpid]
DEBUG: db_postgres [km_resc:166]: db_postgres_get_columns(): use DB1_STRING result type
DEBUG: db_postgres [km_resc:211]: db_postgres_convert_rows(): no rows returned from the query
DEBUG: <core> [db_resc:79]: db_free_columns(): freeing 1 columns
DEBUG: <core> [db_resc:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7fdf60940270
DEBUG: <core> [db_resc:92]: db_free_columns(): freeing result names at 0x7fdf60864270
DEBUG: <core> [db_resc:97]: db_free_columns(): freeing result types at 0x7fdf6074ad38
DEBUG: <core> [db_resc:134]: db_free_result(): freeing result set at 0x7fdf6089af20
DEBUG: db_postgres [km_dbasec:433]: db_postgres_free_query(): PQclear(0x2860ad0) result set
DEBUG: auth_db [authorizec:102]: fetch_credentials(): no result for user '86@examplecom' in [subscriber]
```
When adding additional parameters such as ```modparam("auth_db", "load_credentials", "rpid;accountcode")``` and executing ```if(is_subscriber("$ru", "subscriber", "3"))```, Kamailio quits
```
ERROR: *** cfgtrace:request_route=[LOCATION] c=[/etc/kamailio/kamailiocfg] l=1064 a=27 n=is_subscriber
: <core> [mem/q_mallocc:130]: qm_debug_frag(): BUG: qm_*: fragm 0x7f7126bafc70 (address 0x7f7126bafca0) end overwritten(7f7126ad32c0, abcdefed)!
CRITICAL: <core> [pass_fdc:275]: receive_fd(): EOF on 20
ALERT: <core> [mainc:727]: handle_sigs(): child process 21406 exited by a signal 6
```
I don't see why Kamailio should even lookup the additional values when the ```is_subscriber``` flag is ```2``` or ```3```
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/500
Module: kamailio
Branch: 4.3
Commit: 9e62c2ff843f44c18c418f01285f60c8b5de86d0
URL: https://github.com/kamailio/kamailio/commit/9e62c2ff843f44c18c418f01285f60c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-07T20:24:33+01:00
auth_db: removed trailing spaces for sane git diff
(cherry picked from commit 35fa264fe9a70627e9f17f75e0ce39ddbd3550ba)
---
Modified: modules/auth_db/auth_db_mod.c
Modified: modules/auth_db/authorize.c
---
Diff: https://github.com/kamailio/kamailio/commit/9e62c2ff843f44c18c418f01285f60c…
Patch: https://github.com/kamailio/kamailio/commit/9e62c2ff843f44c18c418f01285f60c…
---
diff --git a/modules/auth_db/auth_db_mod.c b/modules/auth_db/auth_db_mod.c
index abd9c29..3f22f4f 100644
--- a/modules/auth_db/auth_db_mod.c
+++ b/modules/auth_db/auth_db_mod.c
@@ -1,4 +1,4 @@
-/*
+/*
* Digest Authentication Module
*
* Copyright (C) 2001-2003 FhG Fokus
@@ -15,8 +15,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
*
*/
@@ -134,7 +134,7 @@ static param_export_t params[] = {
* Module interface
*/
struct module_exports exports = {
- "auth_db",
+ "auth_db",
DEFAULT_DLFLAGS, /* dlopen flags */
cmds, /* Exported functions */
params, /* Exported parameters */
@@ -153,7 +153,7 @@ static int child_init(int rank)
{
if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN)
return 0; /* do nothing for the main process */
-
+
auth_db_handle = auth_dbf.init(&db_url);
if (auth_db_handle == 0){
LM_ERR("unable to connect to the database\n");
@@ -220,7 +220,7 @@ static int w_is_subscriber(sip_msg_t *msg, char *_uri, char* _table,
{
str suri;
str stable;
- int iflags;
+ int iflags = 0;
int ret;
sip_uri_t puri;
@@ -356,7 +356,7 @@ int parse_aaa_pvs(char *definition, pv_elem_t **pv_def, int *cnt)
/* definition is between p and e */
/* search backwards because PV definition may contain '=' characters */
- for (sep = end; sep >= p && *sep != '='; sep--);
+ for (sep = end; sep >= p && *sep != '='; sep--);
if (sep > p) {
/* pv=column style */
/* set column name */
@@ -385,7 +385,7 @@ int parse_aaa_pvs(char *definition, pv_elem_t **pv_def, int *cnt)
goto parse_error;
}
pv.len = snprintf(pv.s, pve->text.len + 7, "$avp(%.*s)",
- pve->text.len, pve->text.s);
+ pve->text.len, pve->text.s);
}
/* create a pv spec */
diff --git a/modules/auth_db/authorize.c b/modules/auth_db/authorize.c
index 86e1cb7..c307326 100644
--- a/modules/auth_db/authorize.c
+++ b/modules/auth_db/authorize.c
@@ -15,8 +15,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
*
*/
@@ -126,7 +126,7 @@ int fetch_credentials(sip_msg_t *msg, str *user, str* domain, str *table, int fl
}
static inline int get_ha1(struct username* _username, str* _domain,
- const str* _table, char* _ha1, db1_res_t** res)
+ const str* _table, char* _ha1, db1_res_t** res)
{
pv_elem_t *cred;
db_key_t keys[2];
@@ -496,10 +496,10 @@ int auth_check(struct sip_msg* _m, char* _realm, char* _table, char *_flags)
if(ret==AUTH_OK && hdr!=NULL && (iflags&AUTH_CHECK_ID_F)) {
srealm = ((auth_body_t*)(hdr->parsed))->digest.username.user;
-
+
if((furi=parse_from_uri(_m))==NULL)
return AUTH_ERROR;
-
+
if(_m->REQ_METHOD==METHOD_REGISTER || _m->REQ_METHOD==METHOD_PUBLISH) {
if((turi=parse_to_uri(_m))==NULL)
return AUTH_ERROR;
See https://bugsfreebsdorg/bugzilla/show_bugcgi?id=199630 for details and a proposed patch, but I get the same on Fedora 23 with gcc-531-2fc23x86_64
```ERROR: <core> [sr_modulec:576]: load_module(): could not open module </usr/lib64/kamailio/modules/presence_mwiso>: /usr/lib64/kamailio/modules/presence_mwiso: undefined symbol: eat_printable```
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/502