void ast_set_callerid(struct ast_channel *chan, const char *cidnum, const char *cidname, const char *ani);
-
-/*! return a mallocd string with the result of sprintf of the fmt and following args */
-char *ast_safe_string_alloc(const char *fmt, ...);
-
-
-
/*! Start a tone going */
int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol);
/*! Stop a tone from playing */
return res;
}
-/*! \brief printf the string into a correctly sized mallocd buffer, and return the buffer */
-char *ast_safe_string_alloc(const char *fmt, ...)
-{
- char *b2,buf[1];
- int len;
-
- va_list args;
- va_start(args, fmt);
- len = vsnprintf(buf, 1, fmt, args);
- b2 = ast_malloc(len+1);
- vsnprintf(b2, len+1, fmt, args);
- va_end(args);
- return b2;
-}
-
/*! \brief Initiate system shutdown */
void ast_begin_shutdown(int hangup)
{