network: cleanup and improve network handling

- Merge encoded / plain messge handling to ensure fixes land in both
- Fix some potential resource leaks spotted by Coverity

[cleanup commit message]
[fix merge conflicts]
Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Ian Clowes 2022-01-31 10:53:59 +00:00 committed by Nick Hainke
parent 0eca0fae0b
commit 0a962bea1f
5 changed files with 117 additions and 95 deletions

View file

@ -605,9 +605,9 @@ int send_blob_attr_via_network(struct blob_attr* msg, char* method) {
send_tcp(str);
} else {
if (network_config.use_symm_enc) {
send_string_enc(str);
send_string(str, true);
} else {
send_string(str);
send_string(str, false);
}
}