Send Server's get_Parameters() errors to the client#1932
Send Server's get_Parameters() errors to the client#1932bmah888 merged 1 commit intoesnet:masterfrom
Conversation
|
I think I'd like to leverage this change for iperf/#1931 as well. I can validate the requested bit rate within |
|
Thanks for the PR! I think this is the right way to solve the problem. Intending to merge this after some testing. |
bmah888
left a comment
There was a problem hiding this comment.
Thanks this looks good. Used the test cases for #1909 (in particular the mutually-exclusive --file and --udp) and noted that the error codes are propagated from the server back to the client. Noting that this improved behavior is only implemented on the server...the client gains the benefit whether or not it has this code change.
We have to be careful not to make changes to existing error codes, but as this code sequence existed already, we already had this requirement.
Version of iperf3 (or development branch, such as
masteror3.1-STABLE) to which this pull request applies:master
Issues fixed (if any): none
Brief description of code changes (suitable for use as a commit message):
In case
get_parameters()failure, sendSERVER_ERRORstate to the client, following by the error code (i_errno) set insideget_parameters(e.g. theIEUDPFILETRANSFERerror in #1909).This is actually a generalization of already existing mechanism for specific error codes. E.g., with this PR changes, PR #1684 can just set the
IEMAXSERVERTESTDURATIONEXCEEDEDerror inget_parameters(), without adding sendingSERVER_ERROR, etc. specifically for that error.