• G
    rpc: remove trailing whitespace character in error string · 5b924be9
    Guannan Ren 提交于
    Instead of only removing the ending newline character, it is
    better to remove all of standard whitespace character for the
    sake of log format.
    
    One example that we have to do this is:
    After three times incorrect password input, virsh command
    virsh -c qemu://remoteserver/system will report error like:
    
    : Connection reset by peerey,gssapi-keyex,gssapi-with-mic,password).
    
    But it should be:
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
    : Connection reset by peer
    
    The reason is that we dropped the newline, but have a '\r' left.
    The terminal interprets it as "move the cursor back to the start
    of the current line", so the error string is messed up.
    5b924be9
virnetsocket.c 37.7 KB