summaryrefslogtreecommitdiff
path: root/funcs/func_moh.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_moh.c')
-rw-r--r--funcs/func_moh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/funcs/func_moh.c b/funcs/func_moh.c
index 4a38d8fb9..07a78234a 100644
--- a/funcs/func_moh.c
+++ b/funcs/func_moh.c
@@ -30,6 +30,7 @@
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
+#include "asterisk/stringfields.h"
static char *function_moh_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
@@ -40,7 +41,7 @@ static char *function_moh_read(struct ast_channel *chan, char *cmd, char *data,
static void function_moh_write(struct ast_channel *chan, char *cmd, char *data, const char *value)
{
- ast_copy_string(chan->musicclass, value, sizeof(chan->musicclass));
+ ast_string_field_set(chan, musicclass, value);
}
#ifndef BUILTIN_FUNC