File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
applications/zpc/components
zwave_command_handler/src Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,10 @@ bool zwapi_poll()
136
136
zwapi_session_enqueue_rx_frames ();
137
137
bool more_frames = zwapi_session_dequeue_frame (& frame , & len );
138
138
139
- if (frame && len >=1 ) {
140
- zwave_api_protocol_rx_dispatch (frame , len );
139
+ if (frame ) {
140
+ if (len >= 1 ) {
141
+ zwave_api_protocol_rx_dispatch (frame , len );
142
+ }
141
143
free (frame );
142
144
}
143
145
Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ sl_status_t zwave_command_handler_dispatch(
87
87
const uint8_t *frame_data,
88
88
uint16_t frame_length)
89
89
{
90
+ assert (connection);
91
+ assert (frame_data);
92
+ assert (frame_length);
90
93
zwave_command_handler_t handler_to_invoke = {};
91
94
handler_to_invoke.command_class = frame_data[0 ];
92
95
sl_status_t rc = SL_STATUS_NOT_SUPPORTED;
@@ -313,4 +316,4 @@ void zwave_command_handler_print_info(int fd)
313
316
} else {
314
317
dprintf (fd, " %s" , ss.str ().c_str ());
315
318
}
316
- }
319
+ }
You can’t perform that action at this time.
0 commit comments