diff --git a/src/capwap/cw_out_radio_operational_state.c b/src/capwap/cw_out_radio_operational_state.c index 0be15a96..37bcc344 100644 --- a/src/capwap/cw_out_radio_operational_state.c +++ b/src/capwap/cw_out_radio_operational_state.c @@ -15,12 +15,16 @@ int cw_out_radio_operational_states(struct conn *conn, struct cw_action_out *a, the Radio Admin state, adds a CW_RADIO_OPER_STATE item to the radio, depending on results. */ + int nerror=0; + MAVLITER_DEFINE(it,conn->radios); mavliter_foreach(&it){ mbag_item_t * radioitem = mavliter_get(&it); mbag_item_t *ositem = mbag_get(radioitem->data,CW_RADIO_OPER_STATE); - if (!ositem) + if (!ositem){ + nerror++; continue; + } /* Put the radio ID */ cw_put_byte(d+4,radioitem->id); @@ -50,6 +54,14 @@ int cw_out_radio_operational_states(struct conn *conn, struct cw_action_out *a, } + if (nerror) { + if (a->mand) { + cw_log(LOG_ERROR,"Could not send Radio Operational State for all radios. Sent %d out of %d.", + conn->radios->count-nerror,conn->radios->count); + + } + } + return d-dst; }