-
Notifications
You must be signed in to change notification settings - Fork 476
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
fix srtp_remove_stream to use SSRC in host byte order #670
Conversation
This fixes the inconsistency in SSRC byte order usage in the public api. Now all usage should be in host byte order. cisco#220
See @jesup 's comment on #220 at #220 (comment): I don't think changing this while leaving the function name and signature the same is a good idea. Even at an API-breaking change like 3.0.0, this won't have any compiler warning to tell someone porting to the new API that they need to change something. |
@JonathanLennox fair point, so what about the new name, srtp_delete_stream() ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with changes like this for consistency. The app developer should never have to call htons()
or htonl()
to use the libsrtp APIs, IMO. I also agree with Jonathan's comment from Randell that we shouldn't make a change that might blindside developers. Perhaps just rename the API slightly? (We could keep both the old and a new one, but I think that's less desirable. Upgrading SRTP and having a clean interface should not be hard, especially if these kinds of breaking changes are documented in one obvious place.)
Maybe |
I think I like that, how about, I rename to srtp_stream_remove / add / update and add a note to the documentation of srtp_stream_remove about the change in byte order. It will also end up in the CHANGES file. Can make a new task to ensure all API's are reviewed for naming consistency. |
Sounds good to me. |
This is both part of cisco#672 as well as trying to ensure that the parameter change for remove stream is noticed.
This fixes the inconsistency in SSRC byte order usage in the public api. Now all usage should be in host byte order.
#220