added unit type checks to UU_ functions

This commit is contained in:
2018-01-04 12:35:32 +01:00
parent dc8735236f
commit 1e41d4c3cb
7 changed files with 107 additions and 29 deletions
+5
View File
@@ -11,6 +11,11 @@
#include "utils/payload_builder.h"
#include "utils/payload_parser.h"
#define CHECK_TYPE(_unit, _driver) do { \
if ((_unit->driver) != (_driver)) \
return E_BAD_UNIT_TYPE; \
} while (0)
extern char unit_tmp512[512]; // temporary static buffer - not expected to be accessed asynchronously
// TODO add mutex?