Commit c0c925c
committed
Abort SDO server upload when the object has zero length.
A data size of zero bytes cannot be encoded in the "number of bytes
that do not contain data" semantics, as that would require n=4, which
is however limited to two bits (maximum value 3). So the SDO
expedited upload protocol simply cannot convey that condition. The
current implementation however still tries and thereby corrupts the
server command specifier field value.
Avoid that protocol violation by responding with an SDO abort code of
0800 0024h, No data available.
Add a test case for this condition, verifying that the client raises
the appropriate SdoAbortedError exception.1 parent c0a4ae5 commit c0c925c
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments