Browse Source

domain Add \n at end of LM_ERR message, add LM_DBG for db_url

Olle E. Johansson 10 năm trước cách đây
mục cha
commit
ce41c40055
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 1
      modules/domain/domain.c
  2. 2 1
      modules/domain/domain_mod.c

+ 1 - 1
modules/domain/domain.c

@@ -40,7 +40,7 @@ static db_func_t domain_dbf;
 int domain_db_bind(const str* db_url)
 {
 	if (db_bind_mod(db_url, &domain_dbf )) {
-	        LM_ERR("Cannot bind to database module!");
+	        LM_ERR("Cannot bind to database module!\n");
 		return -1;
 	}
 	return 0;

+ 2 - 1
modules/domain/domain_mod.c

@@ -176,7 +176,8 @@ static int mod_init(void)
 
     /* Bind database */
     if (domain_db_bind(&db_url)) {
-	LM_ERR("no database module found\n");
+	LM_DBG("Usign db_url [%.*s]\n", db_url.len, db_url.s);
+	LM_ERR("no database module found. Have you configure thed \"db_url\" modparam properly?\n");
 	return -1;
     }