diff options
author | Ed Tanous <ed@tanous.net> | 2024-04-10 18:58:48 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-04-24 21:52:58 +0300 |
commit | 6b54e4e08678c0e32ed02adc87237f6ffa936691 (patch) | |
tree | c94d20795381c578232495ce7979af71039d07a2 /include | |
parent | 1d1d7784f7858880f4dd732fd287517daf1e1785 (diff) | |
download | bmcweb-6b54e4e08678c0e32ed02adc87237f6ffa936691.tar.xz |
Handle error code properly
As part of the previous patch tests, UpdateService shows this bug, where
on a multipart parser failure, the dbus match object gets instantiated,
and eventually fails. This leads to mediocre logging, and possibly
could leave update service in an undesirable state.
Fix the error by moving the conditional up.
Tested:
Filling a 16MB file with all zeros and sending it now no longer logs
that a monitor has been set up, and returns immediately instead of
waiting for timeout.
```
dd if=/dev/zero of=zeros-file bs=1048576 count=16 of=16mb.txt
curl -k --location POST https://192.168.7.2/redfish/v1/UpdateService/update -F 'UpdateParameters={"Targets":[]} ;type=application/json' -H "Expect:" --user "root:0penBmc" -F UpdateFile=@16mb.txt -v
```
Change-Id: I0962d15c624936b4fa199a675123702003dd697b
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions