Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: Handle special cases for buffer and length
When the buffer is not NULL, but the length is zero then treat this as an empty message. Serialize this in a special way so that the server can restore the same situation. Example: Terminate an operation via C_XxxFinal, but there is no more data for the final part. A call to C_XxxFinal with buffer=NULL and length=0 would be treated as a size query, and would not terminate the operation. So the way to terminate the operation without more data is to specify buffer!=NULL but length=0. When sending a byte array, and the buffer is NULL, and the length is zero, don't treat this is invalid, but as empty message. Example: C_XxxUpdate with an empty message. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
- Loading branch information
Showing
3 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters