mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
When using ast_str with a non-ast_str-enabled API, we need to update the buffer
or otherwise, we cannot use ast_str_strlen(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -403,6 +403,16 @@ void ast_str_reset(struct ast_str *buf),
|
||||
}
|
||||
)
|
||||
|
||||
/*! \brief Update the length of the buffer, after using ast_str merely as a buffer.
|
||||
* \param buf A pointer to the ast_str string.
|
||||
*/
|
||||
AST_INLINE_API(
|
||||
void ast_str_update(struct ast_str *buf),
|
||||
{
|
||||
buf->__AST_STR_USED = strlen(buf->__AST_STR_STR);
|
||||
}
|
||||
)
|
||||
|
||||
/*! \brief Trims trailing whitespace characters from an ast_str string.
|
||||
* \param buf A pointer to the ast_str string.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user