Adding DBG_LIB to all calls of libstrongswan's version of DBG*.
This commit is contained in:
@@ -97,7 +97,8 @@ static bool enumerate_dir_enum(dir_enum_t *this, char **relative,
|
||||
len = snprintf(this->full_end, remaining, "%s", entry->d_name);
|
||||
if (len < 0 || len >= remaining)
|
||||
{
|
||||
DBG1("buffer too small to enumerate file '%s'", entry->d_name);
|
||||
DBG1(DBG_LIB, "buffer too small to enumerate file '%s'",
|
||||
entry->d_name);
|
||||
return FALSE;
|
||||
}
|
||||
if (absolute)
|
||||
@@ -108,7 +109,8 @@ static bool enumerate_dir_enum(dir_enum_t *this, char **relative,
|
||||
{
|
||||
if (stat(this->full, st))
|
||||
{
|
||||
DBG1("stat() on '%s' failed: %s", this->full, strerror(errno));
|
||||
DBG1(DBG_LIB, "stat() on '%s' failed: %s", this->full,
|
||||
strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -133,7 +135,7 @@ enumerator_t* enumerator_create_directory(char *path)
|
||||
len = snprintf(this->full, sizeof(this->full)-1, "%s", path);
|
||||
if (len < 0 || len >= sizeof(this->full)-1)
|
||||
{
|
||||
DBG1("path string '%s' too long", path);
|
||||
DBG1(DBG_LIB, "path string '%s' too long", path);
|
||||
free(this);
|
||||
return NULL;
|
||||
}
|
||||
@@ -148,7 +150,7 @@ enumerator_t* enumerator_create_directory(char *path)
|
||||
this->dir = opendir(path);
|
||||
if (this->dir == NULL)
|
||||
{
|
||||
DBG1("opening directory '%s' failed: %s", path, strerror(errno));
|
||||
DBG1(DBG_LIB, "opening directory '%s' failed: %s", path, strerror(errno));
|
||||
free(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ host_t *host_create_from_dns(char *string, int af, u_int16_t port)
|
||||
error = getaddrinfo(string, NULL, &hints, &result);
|
||||
if (error != 0)
|
||||
{
|
||||
DBG1("resolving '%s' failed: %s", string, gai_strerror(error));
|
||||
DBG1(DBG_LIB, "resolving '%s' failed: %s", string, gai_strerror(error));
|
||||
return NULL;
|
||||
}
|
||||
/* result is a linked list, but we use only the first address */
|
||||
|
||||
@@ -80,14 +80,15 @@ bool from(private_options_t *this, char *filename, int *argcp, char **argvp[],
|
||||
this->nuses++;
|
||||
if (this->nuses >= MAX_USES)
|
||||
{
|
||||
DBG1("optionsfrom called %d times by \"%s\" - looping?", this->nuses + 1, (*argvp)[0]);
|
||||
DBG1(DBG_LIB, "optionsfrom called %d times by \"%s\" - looping?",
|
||||
this->nuses + 1, (*argvp)[0]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fd = fopen(filename, "r");
|
||||
if (fd == NULL)
|
||||
{
|
||||
DBG1("optionsfrom: unable to open file '%s': %s",
|
||||
DBG1(DBG_LIB, "optionsfrom: unable to open file '%s': %s",
|
||||
filename, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
@@ -132,7 +133,7 @@ bool from(private_options_t *this, char *filename, int *argcp, char **argvp[],
|
||||
line.len--;
|
||||
if (!extract_token(&token, delimiter, &line))
|
||||
{
|
||||
DBG1("optionsfrom: missing terminator at %s:%d",
|
||||
DBG1(DBG_LIB, "optionsfrom: missing terminator at %s:%d",
|
||||
filename, linepos);
|
||||
good = FALSE;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user