frame.c: Make debugging easier

* ast_frame_subclass2str() and ast_frame_type2str() now return
   a pointer to the buffer that was passed in instead of void.
   This makes it easier to use these functions inline in
   printf-style debugging statements.

 * Added many missing control frame entries in
   ast_frame_subclass2str.

Change-Id: Ifd0d6578e758cd644c96d17a5383ff2128c572fc
This commit is contained in:
George Joseph
2020-07-06 09:57:18 -06:00
committed by Friendly Automation
parent 955b7b4fdb
commit d093e44b1e
2 changed files with 89 additions and 4 deletions

View File

@@ -635,9 +635,10 @@ int ast_frame_clear(struct ast_frame *frame);
* \param slen Length of subclass buffer
* \param moreinfo Buffer to fill with additional information
* \param mlen Length of moreinfo buffer
* \return Pointer to subclass
* \since 11
*/
void ast_frame_subclass2str(struct ast_frame *f, char *subclass, size_t slen, char *moreinfo, size_t mlen);
char *ast_frame_subclass2str(struct ast_frame *f, char *subclass, size_t slen, char *moreinfo, size_t mlen);
/*!
* \brief Copy the discription of a frame type into the provided string
@@ -645,9 +646,10 @@ void ast_frame_subclass2str(struct ast_frame *f, char *subclass, size_t slen, ch
* \param frame_type The frame type to be described
* \param ftype Buffer to fill with frame type description
* \param len Length of subclass buffer
* \return Pointer to ftype
* \since 11
*/
void ast_frame_type2str(enum ast_frame_type frame_type, char *ftype, size_t len);
char *ast_frame_type2str(enum ast_frame_type frame_type, char *ftype, size_t len);
#if defined(__cplusplus) || defined(c_plusplus)
}