Skip to content

Commit

Permalink
Added missing function comments to error.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Oct 28, 2015
1 parent e0f6255 commit fd1edb6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static FILE *log_file;
static GLog *log_data;
static FILE *log_invalid;

/* Open a debug file whose name is specified in the given path. */
void
dbg_log_open (const char *path)
{
Expand All @@ -49,13 +50,16 @@ dbg_log_open (const char *path)
}
}

/* Close the debug file. */
void
dbg_log_close (void)
{
if (log_file != NULL)
fclose (log_file);
}

/* Open the invalid requests log file whose name is specified in the
* given path. */
void
invalid_log_open (const char *path)
{
Expand All @@ -66,20 +70,24 @@ invalid_log_open (const char *path)
}
}

/* Close the invalid requests log file. */
void
invalid_log_close (void)
{
if (log_invalid != NULL)
fclose (log_invalid);
}

/* Set current overall parsed log data. */
void
set_signal_data (void *p)
{
log_data = p;
}

#if defined(__GLIBC__)
/* Dump to the standard output the values of the overall parsed log
* data. */
static void
dump_struct (FILE * fp)
{
Expand All @@ -97,6 +105,7 @@ dump_struct (FILE * fp)
fprintf (fp, "==%d==\n", pid);
}

/* Custom SIGSEGV handler. */
void
sigsegv_handler (int sig)
{
Expand Down Expand Up @@ -130,6 +139,7 @@ sigsegv_handler (int sig)
#endif

#pragma GCC diagnostic ignored "-Wformat-nonliteral"
/* Write formatted debug log data to the logfile. */
void
dbg_fprintf (const char *fmt, ...)
{
Expand All @@ -144,6 +154,7 @@ dbg_fprintf (const char *fmt, ...)
va_end (args);
}

/* Write formatted invalid requests log data to the logfile. */
void
invalid_fprintf (const char *fmt, ...)
{
Expand Down

0 comments on commit fd1edb6

Please sign in to comment.