Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] fix sendBroadcast() use the size of blocked sockets as the size of buf to send #2391

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

gou4shi1
Copy link
Contributor

The original code

    vector<SocketData*> successful, blocked;
    const int blocklen = blocked.size();
    stat = d->ps->core().sendmsg2(buf, blocklen, (w_mc));

is weird, correct me if I'm wrong :)

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Jun 22, 2022
@maxsharabayko maxsharabayko added this to the Next Release milestone Jun 22, 2022
@ethouris
Copy link
Collaborator

You are right. And I think we should add -Wshadow to the list of warning options.

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Jun 22, 2022

This 650 lines-of-code sendBroadcast(..) function needs to be refactored 🤕 😢

@maxsharabayko maxsharabayko merged commit cdafca5 into Haivision:master Jun 23, 2022
@gou4shi1 gou4shi1 deleted the fix-blocklen branch June 23, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants