Skip to content
Snippets Groups Projects
Commit d87fc1c5 authored by Sean Bright's avatar Sean Bright
Browse files

res_pjsip_transport_websocket: Don't assert on 0 length payloads

If an external pjproject is used and built with assertions enabled, we
will assert if passed a payload length of 0, so treat empty frames as if
we didn't receive them.

Change-Id: I9c5fdccd89cc8d2f3ed7e3ee405ef0fc78178f48
parent 5254ebf0
Branches
Tags
No related merge requests found
......@@ -396,7 +396,9 @@ static void websocket_cb(struct ast_websocket *session, struct ast_variable *par
}
if (opcode == AST_WEBSOCKET_OPCODE_TEXT || opcode == AST_WEBSOCKET_OPCODE_BINARY) {
ast_sip_push_task_wait_serializer(serializer, transport_read, &read_data);
if (read_data.payload_len) {
ast_sip_push_task_wait_serializer(serializer, transport_read, &read_data);
}
} else if (opcode == AST_WEBSOCKET_OPCODE_CLOSE) {
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment