summaryrefslogtreecommitdiff
path: root/res/ari/ari_websockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/ari/ari_websockets.c')
-rw-r--r--res/ari/ari_websockets.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/res/ari/ari_websockets.c b/res/ari/ari_websockets.c
index f3b764bf1..1d2eacd5b 100644
--- a/res/ari/ari_websockets.c
+++ b/res/ari/ari_websockets.c
@@ -163,9 +163,7 @@ int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
#ifdef AST_DEVMODE
if (!session->validator(message)) {
ast_log(LOG_ERROR, "Outgoing message failed validation\n");
- return ast_websocket_write(session->ws_session,
- AST_WEBSOCKET_OPCODE_TEXT, VALIDATION_FAILED,
- strlen(VALIDATION_FAILED));
+ return ast_websocket_write_string(session->ws_session, VALIDATION_FAILED);
}
#endif
@@ -177,8 +175,7 @@ int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
}
ast_debug(3, "Examining ARI event: \n%s\n", str);
- if (ast_websocket_write(session->ws_session,
- AST_WEBSOCKET_OPCODE_TEXT, str, strlen(str))) {
+ if (ast_websocket_write_string(session->ws_session, str)) {
ast_log(LOG_NOTICE, "Problem occurred during websocket write, websocket closed\n");
return -1;
}