MT#56447 more generic websocket_janus_process_json

To allow supplying the handle ID and session ID separately without
requiring it to be in the JSON.

Change-Id: I4a6f18410084add2a37cdf1ea3375072a8e192ca
pull/1611/head
Richard Fuchs 2 years ago
parent 8a5a99d6fe
commit c41188c0ca

@ -1485,15 +1485,15 @@ static void janus_finish_response(JsonBuilder *builder, const char *success, con
}
const char *websocket_janus_process(struct websocket_message *wm) {
static const char *websocket_janus_process_json(struct websocket_message *wm,
uint64_t session_id, uint64_t handle_id)
{
JsonParser *parser = NULL;
JsonReader *reader = NULL;
const char *err = NULL;
int retcode = 200;
const char *transaction = NULL;
const char *success = "success";
uint64_t session_id = 0;
uint64_t handle_id = 0;
struct janus_session *session = NULL;
ilog(LOG_DEBUG, "Processing Janus message: '%.*s'", (int) wm->body->len, wm->body->str);
@ -1662,6 +1662,11 @@ err:
}
const char *websocket_janus_process(struct websocket_message *wm) {
return websocket_janus_process_json(wm, 0, 0);
}
const char *websocket_janus_get(struct websocket_message *wm) {
str uri;
str_init(&uri, wm->uri);

Loading…
Cancel
Save