62 #define MAX_BACKTRACE_FRAMES 20
63 # if defined(HAVE_DLADDR) && defined(HAVE_BFD) && defined(BETTER_BACKTRACES)
207 #define VERBOSE_BUF_INIT_SIZE 256
210 #define LOG_BUF_INIT_SIZE 256
217 unsigned int res = 0;
221 while ((w =
strsep(&stringp,
","))) {
224 if (!strcmp(w,
"*")) {
249 if (!strcasecmp(channel,
"console")) {
251 }
else if (!strncasecmp(channel,
"syslog", 6)) {
256 facility = strchr(channel,
'.');
257 if (!facility++ || !facility) {
264 fprintf(stderr,
"Logger Warning: bad syslog facility in logger.conf\n");
271 openlog(
"asterisk", LOG_PID, chan->
facility);
273 const char *log_dir_prefix =
"";
274 const char *log_dir_separator =
"";
276 if (channel[0] !=
'/') {
278 log_dir_separator =
"/";
283 log_dir_prefix, log_dir_separator, channel, hostname);
286 log_dir_prefix, log_dir_separator, channel);
338 fprintf(stderr,
"Unable to open logger.conf: %s; default settings will be used.\n", strerror(
errno));
340 fprintf(stderr,
"Errors detected in logger.conf: see above; default settings will be used.\n");
351 global_logmask |= chan->
logmask;
360 if (gethostname(hostname,
sizeof(hostname) - 1)) {
362 fprintf(stderr,
"What box has no hostname???\n");
385 if (strcasecmp(s,
"timestamp") == 0) {
387 }
else if (strcasecmp(s,
"rotate") == 0) {
389 }
else if (strcasecmp(s,
"sequential") == 0) {
392 fprintf(stderr,
"Unknown rotatestrategy: %s\n", s);
397 fprintf(stderr,
"rotatetimestamp option has been deprecated. Please use rotatestrategy instead.\n");
415 global_logmask |= chan->
logmask;
432 char *msg = NULL, *emsg = NULL, *sptr, *eptr;
443 if ((size = vsnprintf(msg, 0, fmt, ap)) < 0) {
455 vsnprintf(msg, size + 1, fmt, aq);
463 for (sptr = msg, eptr = emsg; ; sptr++) {
474 fprintf(stdout,
"verbose \"%s\" %d\n", emsg, level);
479 void ast_queue_log(
const char *queuename,
const char *callid,
const char *agent,
const char *event,
const char *fmt, ...)
488 if (!logger_initialized) {
492 if (!queuelog_init) {
494 if (!queuelog_init) {
503 ast_queue_log(
"NONE",
"NONE",
"NONE",
"QUEUESTART",
"%s",
"");
512 ast_strftime(time_str,
sizeof(time_str),
"%F %T.%6q", &tm);
514 vsnprintf(qlog_msg,
sizeof(qlog_msg), fmt, ap);
516 if (
logfiles.queue_adaptive_realtime) {
533 "queuename", queuename,
545 "queuename", queuename,
559 qlog_len = snprintf(qlog_msg,
sizeof(qlog_msg),
"%ld|%s|%s|%s|%s|", (
long)time(NULL), callid, queuename, agent, event);
560 vsnprintf(qlog_msg + qlog_len,
sizeof(qlog_msg) - qlog_len, fmt, ap);
564 fprintf(
qlog,
"%s\n", qlog_msg);
575 int x, y, which, found, res = 0, fd;
576 char *suffixes[4] = {
"",
".gz",
".bz2",
".Z" };
581 snprintf(
new,
sizeof(
new),
"%s.%d", filename, x);
582 fd = open(
new, O_RDONLY);
588 if (rename(filename,
new)) {
589 fprintf(stderr,
"Unable to rename file '%s' to '%s'\n", filename,
new);
596 snprintf(
new,
sizeof(
new),
"%s.%ld", filename, (
long)time(NULL));
597 if (rename(filename,
new)) {
598 fprintf(stderr,
"Unable to rename file '%s' to '%s'\n", filename,
new);
608 for (which = 0; which <
ARRAY_LEN(suffixes); which++) {
609 snprintf(
new,
sizeof(
new),
"%s.%d%s", filename, x, suffixes[which]);
610 fd = open(
new, O_RDONLY);
623 for (y = x; y > 0; y--) {
624 for (which = 0; which <
ARRAY_LEN(suffixes); which++) {
625 snprintf(old,
sizeof(old),
"%s.%d%s", filename, y - 1, suffixes[which]);
626 fd = open(old, O_RDONLY);
630 snprintf(
new,
sizeof(
new),
"%s.%d%s", filename, y, suffixes[which]);
631 if (rename(old,
new)) {
632 fprintf(stderr,
"Unable to rename file '%s' to '%s'\n", old,
new);
641 snprintf(
new,
sizeof(
new),
"%s.0", filename);
642 if (rename(filename,
new)) {
643 fprintf(stderr,
"Unable to rename file '%s' to '%s'\n", filename,
new);
683 logfiles.queue_adaptive_realtime = 1;
685 logfiles.queue_adaptive_realtime = 0;
710 char qfname[PATH_MAX];
727 qlog = fopen(qfname,
"a");
737 int queue_rotate = rotate;
746 if (ftello(
qlog) > 0x40000000) {
769 if (ftello(f->
fileptr) > 0x40000000) {
775 if (rotate || rotate_this) {
781 filesize_reload_needed = 0;
789 ast_queue_log(
"NONE",
"NONE",
"NONE",
"CONFIGRELOAD",
"%s",
"");
790 ast_verb(1,
"Asterisk Queue Logger restarted\n");
814 "Usage: logger reload\n"
815 " Reloads the logger subsystem state. Use after restarting syslogd(8) if you are using syslog logging.\n";
821 ast_cli(a->
fd,
"Failed to reload the logger\n");
833 "Usage: logger rotate\n"
834 " Rotates and Reopens the log files.\n";
840 ast_cli(a->
fd,
"Failed to reload the logger and rotate log files\n");
854 e->
command =
"logger set level {DEBUG|NOTICE|WARNING|ERROR|VERBOSE|DTMF} {on|off}";
856 "Usage: logger set level {DEBUG|NOTICE|WARNING|ERROR|VERBOSE|DTMF} {on|off}\n"
857 " Set a specific log level to enabled/disabled for this console.\n";
881 ast_cli(a->
fd,
"Logger status for '%s' has been set to '%s'.\n",
levels[level], state ?
"on" :
"off");
891 #define FORMATL "%-35.35s %-8.8s %-9.9s "
895 e->
command =
"logger show channels";
897 "Usage: logger show channels\n"
898 " List configured logger channels.\n";
912 chan->
disabled ?
"Disabled" :
"Enabled");
944 filesize_reload_needed = 1;
949 .sa_flags = SA_RESTART,
957 if (syslog_level < 0) {
959 fprintf(stderr,
"ast_log_vsyslog called with bogus level: %d\n", msg->
level);
963 snprintf(buf,
sizeof(buf),
"%s[%ld]: %s:%d in %s: %s",
967 syslog(syslog_level,
"%s", buf);
975 struct verb *v = NULL;
1000 char tmp1[80], tmp2[80], tmp3[80], tmp4[80];
1007 snprintf(linestr,
sizeof(linestr),
"%d", logmsg->
line);
1009 snprintf(buf,
sizeof(buf),
"[%s] %s[%ld]: %s:%s %s: %s",
1029 res = fprintf(chan->
fileptr,
"[%s] %s[%ld] %s: %s",
1032 fprintf(stderr,
"**** Asterisk Logging Error: ***********\n");
1034 fprintf(stderr,
"Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->
filename);
1036 fprintf(stderr,
"Logger Warning: Unable to write to log file '%s': %s (disabled)\n", chan->
filename, strerror(
errno));
1039 }
else if (res > 0) {
1045 fputs(logmsg->
message, stdout);
1051 if (filesize_reload_needed) {
1053 ast_verb(1,
"Rotated Logs Per SIGXFSZ (Exceeded file size limit)\n");
1080 while ((msg = next)) {
1107 char qfname[PATH_MAX];
1120 qlog = fopen(qfname,
"a");
1155 logger_initialized = 1;
1163 struct verb *cur = NULL;
1167 logger_initialized = 0;
1207 void ast_log(
int level,
const char *file,
int line,
const char *
function,
const char *fmt, ...)
1215 char datestring[256];
1246 if (level !=
__LOG_VERBOSE && !(global_logmask & (1 << level)))
1274 ast_strftime(datestring,
sizeof(datestring), dateformat, &tm);
1278 logmsg->
level = level;
1279 logmsg->
line = line;
1308 ast_log(
LOG_ERROR,
"Unable to allocate memory for backtrace structure!\n");
1338 #if defined(BETTER_BACKTRACES)
1343 asymbol **syms = NULL;
1345 const char *lastslash;
1347 const char *file, *func;
1349 char address_str[128];
1351 size_t strings_size;
1355 #if defined(BETTER_BACKTRACES)
1356 strings_size = num_frames *
sizeof(*strings);
1358 eachlen =
ast_calloc(num_frames,
sizeof(*eachlen));
1360 if (!eachlen || !strings) {
1366 for (stackfr = 0; stackfr <
num_frames; stackfr++) {
1367 int found = 0, symbolcount;
1371 if (!dladdr(addresses[stackfr], &dli)) {
1375 if (strcmp(dli.dli_fname,
"asterisk") == 0) {
1376 char asteriskpath[256];
1378 if (!(dli.dli_fname =
ast_utils_which(
"asterisk", asteriskpath,
sizeof(asteriskpath)))) {
1381 dli.dli_fname =
"asterisk";
1385 lastslash = strrchr(dli.dli_fname,
'/');
1386 if ((bfdobj = bfd_openr(dli.dli_fname, NULL)) &&
1387 bfd_check_format(bfdobj, bfd_object) &&
1388 (allocsize = bfd_get_symtab_upper_bound(bfdobj)) > 0 &&
1390 (symbolcount = bfd_canonicalize_symtab(bfdobj, syms))) {
1392 if (bfdobj->flags & DYNAMIC) {
1393 offset = addresses[stackfr] - dli.dli_fbase;
1395 offset = addresses[stackfr] - (
void *) 0;
1398 for (section = bfdobj->sections; section; section = section->next) {
1399 if (!bfd_get_section_flags(bfdobj, section) & SEC_ALLOC ||
1400 section->vma > offset ||
1401 section->size + section->vma < offset) {
1405 if (!bfd_find_nearest_line(bfdobj, section, syms, offset - section->vma, &file, &func, &line)) {
1410 file = file ? file :
"";
1414 if ((lastslash = strrchr(file,
'/'))) {
1415 const char *prevslash;
1417 for (prevslash = lastslash - 1; *prevslash !=
'/' && prevslash >= file; prevslash--) {
1419 if (prevslash >= file) {
1420 lastslash = prevslash;
1423 if (dli.dli_saddr == NULL) {
1424 address_str[0] =
'\0';
1426 snprintf(address_str,
sizeof(address_str),
" (%p+%lX)",
1428 (
unsigned long) (addresses[stackfr] - dli.dli_saddr));
1430 snprintf(msg,
sizeof(msg),
"%s:%u %s()%s",
1431 lastslash ? lastslash + 1 : file, line,
1445 if (dli.dli_saddr == NULL) {
1446 address_str[0] =
'\0';
1448 snprintf(address_str,
sizeof(address_str),
" (%p+%lX)",
1450 (
unsigned long) (addresses[stackfr] - dli.dli_saddr));
1452 snprintf(msg,
sizeof(msg),
"%s %s()%s",
1453 lastslash ? lastslash + 1 : dli.dli_fname,
1454 S_OR(dli.dli_sname,
"<unknown>"),
1461 eachlen[stackfr] = strlen(msg) + 1;
1462 if (!(tmp =
ast_std_realloc(strings, strings_size + eachlen[stackfr]))) {
1468 strings[stackfr] = (
char *) strings + strings_size;
1469 strcpy(strings[stackfr], msg);
1470 strings_size += eachlen[stackfr];
1476 strings[0] = (
char *) strings + num_frames *
sizeof(*strings);
1477 for (stackfr = 1; stackfr <
num_frames; stackfr++) {
1478 strings[stackfr] = strings[stackfr - 1] + eachlen[stackfr - 1];
1485 strings = backtrace_symbols(addresses, num_frames);
1512 ast_debug(1,
"Could not allocate memory for backtrace\n");
1516 ast_log(
LOG_WARNING,
"Must run configure with '--with-execinfo' for stack backtraces.\n");
1520 void __ast_verbose_ap(
const char *file,
int line,
const char *func,
const char *fmt, va_list ap)
1537 datefmt =
ast_alloca(strlen(date) + 3 + strlen(fmt) + 1);
1538 sprintf(datefmt,
"%c[%s] %s", 127, date, fmt);
1542 sprintf(tmp,
"%c%s", 127, fmt);
1556 void __ast_verbose(
const char *file,
int line,
const char *func,
const char *fmt, ...)
1608 return cur ? 0 : -1;
1621 global_logmask |= cur->
logmask;
1635 if ((level >= 16) && !available && !
levels[level]) {
1640 if (
levels[level] && !strcasecmp(
levels[level], name)) {
1642 "Unable to register dynamic logger level '%s': a standard logger level uses that name.\n",
1652 "Unable to register dynamic logger level '%s'; maximum number of levels registered.\n",
1663 ast_debug(1,
"Registered dynamic logger level '%s' with index %u.\n", name, available);
1672 unsigned int found = 0;
1682 if (strcasecmp(
levels[x], name)) {
1695 global_logmask &= ~(1 << x);
1701 ast_debug(1,
"Unregistered dynamic logger level '%s' with index %u.\n", name, x);
void pbx_substitute_variables_helper(struct ast_channel *c, const char *cp1, char *cp2, int count)
struct ast_bt * ast_bt_create(void)
#define AST_THREADSTORAGE(name)
Define a thread storage variable.
enum sip_cc_notify_state state
static void logger_print_normal(struct logmsg *logmsg)
Print a normal log message to the channels.
static struct ast_cli_entry cli_logger[]
void ast_std_free(void *ptr)
Main Channel structure associated with a channel.
static char * handle_logger_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
#define AST_CLI_DEFINE(fn, txt,...)
int ast_store_realtime(const char *family,...) attribute_sentinel
Create realtime configuration.
#define AST_LIST_LOCK(head)
Locks a list.
int ast_safe_system(const char *s)
Safely spawn an external program while closing file descriptors.
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
const char * ast_variable_retrieve(const struct ast_config *config, const char *category, const char *variable)
Gets a variable.
char * strsep(char **str, const char *delims)
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized...
static unsigned int global_logmask
String manipulation functions.
static struct sigaction handle_SIGXFSZ
static const int colors[NUMLOGLEVELS]
Colors used in the console for logging.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define ast_channel_unref(c)
Decrease channel reference count.
static pthread_t logthread
int ast_unload_realtime(const char *family)
Release any resources cached for a realtime family.
static int rotate_file(const char *filename)
Time-related functions and macros.
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
descriptor for a cli entry.
#define AST_LIST_UNLOCK(head)
Attempts to unlock a list.
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category)
Goes through variables.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
char * ast_utils_which(const char *binary, char *fullpath, size_t fullpath_size)
Resolve a binary to a full pathname.
static unsigned int make_components(const char *s, int lineno)
void ast_verbose(const char *fmt,...)
static struct logchannel * make_logchannel(const char *channel, const char *components, int lineno)
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
struct ast_tm * ast_localtime(const struct timeval *timep, struct ast_tm *p_tm, const char *zone)
Timezone-independent version of localtime_r(3).
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define LOG_BUF_INIT_SIZE
Structure for variables, used for configurations and for channel variables.
struct logchannel::@283 list
void ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt,...)
int ast_str_set_va(struct ast_str **buf, ssize_t max_len, const char *fmt, va_list ap)
Set a dynamic string from a va_list.
#define AST_LIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
void * ast_std_realloc(void *ptr, size_t size)
Configuration File Parser.
char * term_strip(char *outbuf, const char *inbuf, int maxout)
#define ast_calloc_with_stringfields(n, type, size)
Allocate a structure with embedded stringfields in a single allocation.
char ** ast_bt_get_symbols(void **addresses, size_t num_frames)
static char * levels[NUMLOGLEVELS]
Logging channels used in the Asterisk logging system.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
unsigned int queue_log_to_file
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
void ast_console_toggle_loglevel(int fd, int level, int state)
enables or disables logging of a specified level to the console fd specifies the index of the console...
Definitions to aid in the use of thread local storage.
void ast_cli(int fd, const char *fmt,...)
int ast_syslog_priority_from_loglevel(int level)
Maps an Asterisk log level (i.e. LOG_ERROR) to a syslog priority constant.
#define ast_cond_signal(cond)
struct ast_config * ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags)
Load a config file.
void __ast_verbose(const char *file, int line, const char *func, const char *fmt,...)
This works like ast_log, but prints verbose messages to the console depending on verbosity level set...
#define ast_verb(level,...)
void ast_config_destroy(struct ast_config *config)
Destroys a config.
static struct @282 logfiles
#define VERBOSE_BUF_INIT_SIZE
static void update_logchannels(void)
pthread_cond_t ast_cond_t
static struct ast_threadstorage log_buf
static int logger_initialized
void ast_child_verbose(int level, const char *fmt,...)
void ast_logger_unregister_level(const char *name)
Unregister a previously registered logger level.
static int filesize_reload_needed
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
static int logger_queue_rt_start(void)
#define AST_RWLIST_INSERT_HEAD
#define EVENT_FLAG_SYSTEM
#define ast_debug(level,...)
Log a DEBUG message.
General Asterisk PBX channel definitions.
#define ast_opt_timestamp
int ast_register_verbose(void(*verboser)(const char *string)) attribute_warn_unused_result
Asterisk file paths, configured in asterisk.conf.
int ast_get_tid(void)
Get current thread ID.
static char * handle_logger_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
CLI command to show logging system configuration.
#define AST_PTHREADT_NULL
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define AST_RWLIST_TRAVERSE
#define AST_STRING_FIELD(name)
Declare a string field.
void term_filter_escapes(char *line)
#define AST_RWLIST_REMOVE_CURRENT
int logger_reload(void)
Reload logger without rotating log files.
const ast_string_field function
static char queue_log_name[256]
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
static char exec_after_rotate[256]
int ast_logger_register_level(const char *name)
Register a new logger level.
static void _handle_SIGXFSZ(int sig)
Syslog support functions for Asterisk logging.
Core PBX routines and definitions.
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
#define AST_LIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a list of specified type, statically initialized.
char * term_color(char *outbuf, const char *inbuf, int fgcolor, int bgcolor, int maxout)
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
#define ast_strdupa(s)
duplicate a string in memory from the stack
static void ast_log_vsyslog(struct logmsg *msg)
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
const ast_string_field date
char * ast_skip_blanks(const char *str)
Gets a pointer to the first non-whitespace character in a string.
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
#define ast_cond_destroy(cond)
void(* verboser)(const char *string)
const char * ast_config_AST_LOG_DIR
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
static void * logger_thread(void *data)
Actual logging thread.
#define ast_pthread_create(a, b, c, d)
static void logger_queue_init(void)
void * ast_std_calloc(size_t nmemb, size_t size)
#define AST_RWLIST_REMOVE_HEAD
Prototypes for public functions only of internal interest,.
void ast_console_puts_mutable(const char *string, int level)
log the string to the console, and all attached console clients
int ast_strftime(char *buf, size_t len, const char *format, const struct ast_tm *tm)
Special version of strftime(3) that handles fractions of a second. Takes the same arguments as strfti...
void * addresses[AST_MAX_BT_FRAMES]
Structure used to handle boolean flags.
#define AST_MAX_BT_FRAMES
int ast_realtime_require_field(const char *family,...) attribute_sentinel
Inform realtime what fields that may be stored.
Support for logging to various files, console and syslog Configuration in file logger.conf.
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
const ast_string_field level_name
static int available(struct dahdi_pvt **pvt, int is_specific_channel)
static char dateformat[256]
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
Standard Command Line Interface.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
int ast_cli_register_multiple(struct ast_cli_entry *e, int len)
Register multiple commands.
int ast_syslog_facility(const char *facility)
Maps a syslog facility name from a string to a syslog facility constant.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
int ast_bt_get_addresses(struct ast_bt *bt)
const ast_string_field message
static struct ast_threadstorage verbose_buf
Handy terminal functions for vt* terms.
static int reload_logger(int rotate)
#define AST_APP_ARG(name)
Define an application argument.
struct ast_variable * next
#define ast_mutex_init(pmutex)
static void init_logger_chain(int locked)
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
#define CONFIG_STATUS_FILEINVALID
const ast_string_field file
#define ast_mutex_destroy(a)
static int close_logger_thread
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep)
Performs the 'nonstandard' argument separation process for an application.
struct ast_channel * ast_dummy_channel_alloc(void)
Create a fake channel structure.
int ast_unregister_verbose(void(*verboser)(const char *string)) attribute_warn_unused_result
static int logger_queue_restart(int queue_rotate)
#define manager_event(category, event, contents,...)
External routines may send asterisk manager events this way.
void __ast_verbose_ap(const char *file, int line, const char *func, const char *fmt, va_list ap)
static snd_pcm_format_t format
static char * handle_logger_set_level(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static ast_cond_t logcond
#define AST_RWLIST_TRAVERSE_SAFE_END
void * ast_bt_destroy(struct ast_bt *bt)
static char * handle_logger_rotate(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
static char hostname[MAXHOSTNAMELEN]
int ast_mkdir(const char *path, int mode)
Recursively create directory path.
#define ast_string_field_set(x, field, data)
Set a field to a simple string value.
int ast_check_realtime(const char *family)
Check if realtime engine is configured for family.
unsigned int queue_adaptive_realtime