Replaced some DBG_LIB with more specific groups.

This commit is contained in:
Tobias Brunner
2010-04-06 12:47:40 +02:00
parent 8b0e09103b
commit 894936ce9e
6 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -83,7 +83,7 @@ static host_t* acquire_address(private_attribute_manager_t *this,
if (!host) if (!host)
{ {
DBG1(DBG_LIB, "acquiring address from pool '%s' failed", pool); DBG1(DBG_CFG, "acquiring address from pool '%s' failed", pool);
} }
return host; return host;
} }
@@ -113,7 +113,7 @@ static void release_address(private_attribute_manager_t *this,
if (!found) if (!found)
{ {
DBG1(DBG_LIB, "releasing address to pool '%s' failed", pool); DBG1(DBG_CFG, "releasing address to pool '%s' failed", pool);
} }
} }
@@ -206,7 +206,7 @@ static attribute_handler_t* handle(private_attribute_manager_t *this,
if (!handled) if (!handled)
{ {
DBG1(DBG_LIB, "handling %N attribute failed", DBG1(DBG_CFG, "handling %N attribute failed",
configuration_attribute_type_names, type); configuration_attribute_type_names, type);
} }
return handled; return handled;
+8 -8
View File
@@ -203,7 +203,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
requested->get_family(requested) != requested->get_family(requested) !=
this->base->get_family(this->base)) this->base->get_family(this->base))
{ {
DBG1(DBG_LIB, "IP pool address family mismatch"); DBG1(DBG_CFG, "IP pool address family mismatch");
return NULL; return NULL;
} }
@@ -217,7 +217,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
id = this->ids->get(this->ids, id); id = this->ids->get(this->ids, id);
if (id) if (id)
{ {
DBG1(DBG_LIB, "reassigning offline lease to '%Y'", id); DBG1(DBG_CFG, "reassigning offline lease to '%Y'", id);
this->online->put(this->online, id, (void*)offset); this->online->put(this->online, id, (void*)offset);
break; break;
} }
@@ -227,7 +227,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
offset = (uintptr_t)this->online->get(this->online, id); offset = (uintptr_t)this->online->get(this->online, id);
if (offset && offset == host2offset(this, requested)) if (offset && offset == host2offset(this, requested))
{ {
DBG1(DBG_LIB, "reassigning online lease to '%Y'", id); DBG1(DBG_CFG, "reassigning online lease to '%Y'", id);
break; break;
} }
@@ -239,7 +239,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
id = id->clone(id); id = id->clone(id);
this->ids->put(this->ids, id, id); this->ids->put(this->ids, id, id);
this->online->put(this->online, id, (void*)offset); this->online->put(this->online, id, (void*)offset);
DBG1(DBG_LIB, "assigning new lease to '%Y'", id); DBG1(DBG_CFG, "assigning new lease to '%Y'", id);
break; break;
} }
@@ -252,7 +252,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
{ {
/* destroy reference to old ID */ /* destroy reference to old ID */
old_id = this->ids->remove(this->ids, old_id); old_id = this->ids->remove(this->ids, old_id);
DBG1(DBG_LIB, "reassigning existing offline lease by '%Y'" DBG1(DBG_CFG, "reassigning existing offline lease by '%Y'"
" to '%Y'", old_id, id); " to '%Y'", old_id, id);
if (old_id) if (old_id)
{ {
@@ -267,7 +267,7 @@ METHOD(mem_pool_t, acquire_address, host_t*,
} }
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
DBG1(DBG_LIB, "pool '%s' is full, unable to assign address", DBG1(DBG_CFG, "pool '%s' is full, unable to assign address",
this->name); this->name);
break; break;
} }
@@ -294,7 +294,7 @@ METHOD(mem_pool_t, release_address, bool,
id = this->ids->get(this->ids, id); id = this->ids->get(this->ids, id);
if (id) if (id)
{ {
DBG1(DBG_LIB, "lease %H by '%Y' went offline", address, id); DBG1(DBG_CFG, "lease %H by '%Y' went offline", address, id);
this->offline->put(this->offline, id, (void*)offset); this->offline->put(this->offline, id, (void*)offset);
found = TRUE; found = TRUE;
} }
@@ -433,7 +433,7 @@ mem_pool_t *mem_pool_create(char *name, host_t *base, int bits)
if (bits > POOL_LIMIT) if (bits > POOL_LIMIT)
{ {
bits = POOL_LIMIT; bits = POOL_LIMIT;
DBG1(DBG_LIB, "virtual IP pool too large, limiting to %H/%d", DBG1(DBG_CFG, "virtual IP pool too large, limiting to %H/%d",
base, addr_bits - bits); base, addr_bits - bits);
} }
this->size = 1 << (bits); this->size = 1 << (bits);
+2 -2
View File
@@ -174,7 +174,7 @@ static void load_entries(private_attr_provider_t *this)
host = host_create_from_string(token, 0); host = host_create_from_string(token, 0);
if (!host) if (!host)
{ {
DBG1(DBG_LIB, "invalid host in key %s: %s", key, token); DBG1(DBG_CFG, "invalid host in key %s: %s", key, token);
continue; continue;
} }
if (!type) if (!type)
@@ -195,7 +195,7 @@ static void load_entries(private_attr_provider_t *this)
} }
if (!type) if (!type)
{ {
DBG1(DBG_LIB, "mapping attribute type %s failed", key); DBG1(DBG_CFG, "mapping attribute type %s failed", key);
break; break;
} }
} }
@@ -65,7 +65,7 @@ plugin_t *attr_sql_plugin_create()
uri = lib->settings->get_str(lib->settings, "libhydra.plugins.attr-sql.database", NULL); uri = lib->settings->get_str(lib->settings, "libhydra.plugins.attr-sql.database", NULL);
if (!uri) if (!uri)
{ {
DBG1(DBG_LIB, "attr-sql plugin: database URI not set"); DBG1(DBG_CFG, "attr-sql plugin: database URI not set");
return NULL; return NULL;
} }
@@ -76,7 +76,7 @@ plugin_t *attr_sql_plugin_create()
this->db = lib->db->create(lib->db, uri); this->db = lib->db->create(lib->db, uri);
if (!this->db) if (!this->db)
{ {
DBG1(DBG_LIB, "attr-sql plugin failed to connect to database"); DBG1(DBG_CFG, "attr-sql plugin failed to connect to database");
free(this); free(this);
return NULL; return NULL;
} }
@@ -127,7 +127,7 @@ static host_t* check_lease(private_sql_attribute_t *this, char *name,
host = host_create_from_chunk(AF_UNSPEC, address, 0); host = host_create_from_chunk(AF_UNSPEC, address, 0);
if (host) if (host)
{ {
DBG1(DBG_LIB, "acquired existing lease for address %H in" DBG1(DBG_CFG, "acquired existing lease for address %H in"
" pool '%s'", host, name); " pool '%s'", host, name);
return host; return host;
} }
@@ -202,13 +202,13 @@ static host_t* get_lease(private_sql_attribute_t *this, char *name,
host = host_create_from_chunk(AF_UNSPEC, address, 0); host = host_create_from_chunk(AF_UNSPEC, address, 0);
if (host) if (host)
{ {
DBG1(DBG_LIB, "acquired new lease for address %H in pool '%s'", DBG1(DBG_CFG, "acquired new lease for address %H in pool '%s'",
host, name); host, name);
return host; return host;
} }
} }
} }
DBG1(DBG_LIB, "no available address found in pool '%s'", name); DBG1(DBG_CFG, "no available address found in pool '%s'", name);
return NULL; return NULL;
} }
+1 -1
View File
@@ -244,7 +244,7 @@ static void print_plugins()
len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin); len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin);
} }
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
DBG1(DBG_LIB, "loaded plugins: %s", buf); DBG1(DBG_DMN, "loaded plugins: %s", buf);
} }
int main(int argc, char **argv) int main(int argc, char **argv)