[OpenSIPS-Devel] [ opensips-Bugs-3407299 ] auth_db log problem

SourceForge.net noreply at sourceforge.net
Mon Sep 12 10:10:18 CEST 2011


Bugs item #3407299, was opened at 2011-09-10 22:21
Message generated for change (Comment added) made by vladut-paiu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3407299&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.7.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Revels (rrevels)
Assigned to: Nobody/Anonymous (nobody)
Summary: auth_db log problem

Initial Comment:
I'm getting a crash in auth_db when I have a int column being returned as one of the credentials columns and debug is turned up to debug level.  Minor change to fix it.  Here is a diff from svn


Index: modules/auth_db/authorize.c
===================================================================
--- modules/auth_db/authorize.c	(revision 8366)
+++ modules/auth_db/authorize.c	(working copy)
@@ -146,6 +146,7 @@
 	int i;
 
 	for (cred=credentials, i=1; cred; cred=cred->next, i++) {
+		LM_DBG("Going through auth avp loop with i = %d  and type = %d \n", i, result->col.types[i]);
 		switch (result->col.types[i]) {
 		case DB_STR:
 			ivalue.s = VAL_STR(&(result->rows[0].values[i]));
@@ -163,6 +164,7 @@
 					cred->avp_name, ivalue.s.len, ZSW(ivalue.s.s));
 			break;
 		case DB_STRING:
+			LM_DBG("triggered db_string \n");
 			ivalue.s.s = (char*)VAL_STRING(&(result->rows[0].values[i]));
 
 			if (VAL_NULL(&(result->rows[0].values[i])) ||
@@ -178,6 +180,7 @@
 					cred->avp_name, ivalue.s.len, ZSW(ivalue.s.s));
 			break;
 		case DB_INT:
+			LM_DBG("triggered db_int \n");
 			if (VAL_NULL(&(result->rows[0].values[i])))
 				continue;
 
@@ -188,8 +191,8 @@
 				return -1;
 			}
 
-			LM_DBG("set string AVP %d = \"%.*s\"\n",
-					cred->avp_name, ivalue.s.len, ZSW(ivalue.s.s));
+			LM_DBG("set string AVP %d = \"%d\"\n",
+					cred->avp_name, ivalue.n);
 			break;
 		default:
 			LM_ERR("subscriber table column %d `%.*s' has unsuported type. "


----------------------------------------------------------------------

Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2011-09-12 11:10

Message:
Hello,

Thank you for reporting this. I have committed a fix for this issue both
in trunk and in the 1.7 branch.

Regards,
Vlad

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3407299&group_id=232389



More information about the Devel mailing list