Browse Source

db_text: more details in log message when nr of columns is too small

Daniel-Constantin Mierla 8 years ago
parent
commit
2683b20d7b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/modules/db_text/dbt_base.c

+ 3 - 2
src/modules/db_text/dbt_base.c

@@ -212,9 +212,10 @@ int dbt_query(db1_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t* _v,
 	}
 	}
 
 
 
 
-	if(!_tbc || _tbc->nrcols < _nc)
+	if(_tbc->nrcols < _nc)
 	{
 	{
-		LM_ERR("table %s not loaded! (too few columns)\n", CON_TABLE(_h)->s);
+		LM_ERR("table %s - too few columns (%d < %d)\n", CON_TABLE(_h)->s,
+				_tbc->nrcols, _nc);
 		goto error;
 		goto error;
 	}
 	}
 	if(_k)
 	if(_k)