versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.27k stars 1.13k forks source link

Inconsistency between fbs and worker #1246

Closed ybybwdwd closed 11 months ago

ybybwdwd commented 11 months ago

In request.fbs, the Request.handler_id is required,

table Request {
    id: uint32;
    method: Method;
    handler_id: string (required);
    body: Body;
}

but in worker ChannelRequest::ChannelRequest():110 checks if the field exists

// Handler ID is optional.
if (flatbuffers::IsFieldPresent(this->data, FBS::Request::Request::VT_HANDLERID))
{
    this->handlerId = this->data->handlerId()->str();
}
ibc commented 11 months ago

@jmillan I think we can safely remove that check in Worker.cpp, right?

jmillan commented 11 months ago

Yep, that check can be removed.

EDIT: I'm quite sure, but needs to be checked.

ibc commented 11 months ago

Same applies to ChannelNotification.cpp. On it.