rename tf response helpers to com_*

This commit is contained in:
2017-12-23 21:05:28 +01:00
parent 4f92b97305
commit 92c28c5daf
7 changed files with 48 additions and 48 deletions
+5 -5
View File
@@ -509,7 +509,7 @@ void ureg_deliver_unit_request(TF_Msg *msg)
if (!pp.ok) { dbg("!! pp not OK!"); }
if (callsign == 0 || !pp.ok) {
tf_respond_malformed_cmd(msg->frame_id);
com_respond_malformed_cmd(msg->frame_id);
return;
}
@@ -519,7 +519,7 @@ void ureg_deliver_unit_request(TF_Msg *msg)
if (pUnit->callsign == callsign) {
bool ok = pUnit->driver->handleRequest(pUnit, msg->frame_id, command, &pp);
if (ok && confirmed) {
tf_respond_ok(msg->frame_id);
com_respond_ok(msg->frame_id);
}
return;
}
@@ -527,7 +527,7 @@ void ureg_deliver_unit_request(TF_Msg *msg)
}
// Not found
tf_respond_snprintf(MSG_ERROR, msg->frame_id, "NO UNIT @ %"PRIu8, callsign);
com_respond_snprintf(msg->frame_id, MSG_ERROR, "NO UNIT @ %"PRIu8, callsign);
}
@@ -547,7 +547,7 @@ void ureg_report_active_units(TF_ID frame_id)
bool suc = true;
uint8_t *buff = malloc_ck(msglen, &suc);
if (!suc) { tf_respond_str(MSG_ERROR, frame_id, "OUT OF MEMORY"); return; }
if (!suc) { com_respond_str(MSG_ERROR, frame_id, "OUT OF MEMORY"); return; }
{
PayloadBuilder pb = pb_start(buff, msglen, NULL);
@@ -562,7 +562,7 @@ void ureg_report_active_units(TF_ID frame_id)
assert_param(pb.ok);
tf_respond_buf(MSG_SUCCESS, frame_id, buff, msglen);
com_respond_buf(frame_id, MSG_SUCCESS, buff, msglen);
}
free(buff);