Skip to content

refactor: packet broadcast functions now return errors#2542

Merged
JFreegman merged 1 commit intoTokTok:masterfrom
JFreegman:group_broadcast_error
Jan 11, 2024
Merged

refactor: packet broadcast functions now return errors#2542
JFreegman merged 1 commit intoTokTok:masterfrom
JFreegman:group_broadcast_error

Conversation

@JFreegman
Copy link
Member

@JFreegman JFreegman commented Jan 10, 2024

We now return an error if our broadcast packets fail to send for every peer in the group.

This introduces an API change via an additional error case for custom group packets.


This change is Reviewable

@JFreegman JFreegman added the refactor Refactoring production code, eg. renaming a variable, not affecting semantics label Jan 10, 2024
@JFreegman JFreegman added this to the v0.2.19 milestone Jan 10, 2024
@JFreegman JFreegman force-pushed the group_broadcast_error branch 3 times, most recently from 4085871 to 40cd3e7 Compare January 10, 2024 21:00
@codecov
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (af4cb31) 69.08% compared to head (5b9c420) 69.08%.

Files Patch % Lines
toxcore/group_chats.c 76.92% 6 Missing ⚠️
toxcore/tox.c 0.00% 2 Missing ⚠️
toxcore/tox_api.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2542   +/-   ##
=======================================
  Coverage   69.08%   69.08%           
=======================================
  Files          96       96           
  Lines       28042    28052   +10     
=======================================
+ Hits        19372    19381    +9     
- Misses       8670     8671    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JFreegman JFreegman force-pushed the group_broadcast_error branch from 40cd3e7 to c241ad1 Compare January 11, 2024 05:33
Copy link
Member

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets be safe and add the api breakage tag

@Green-Sky Green-Sky added the api break Change breaks API or ABI label Jan 11, 2024
@JFreegman JFreegman force-pushed the group_broadcast_error branch from c241ad1 to 688391e Compare January 11, 2024 15:06
We now return an error if our broadcast packets fail to
send for every peer in the group
@JFreegman
Copy link
Member Author

toxcore/group_chats.c line 5103 at r1 (raw file):

Previously, Green-Sky (Erik Scholz) wrote…

@iphydf add a rule that all negative return values need to be in the functions documentation. :)

Done.

@JFreegman
Copy link
Member Author

toxcore/tox.h line 4740 at r1 (raw file):

Previously, Green-Sky (Erik Scholz) wrote…

shrug

Done.

@JFreegman JFreegman merged commit 5b9c420 into TokTok:master Jan 11, 2024
@JFreegman JFreegman deleted the group_broadcast_error branch January 11, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api break Change breaks API or ABI refactor Refactoring production code, eg. renaming a variable, not affecting semantics

Development

Successfully merging this pull request may close these issues.

2 participants