|
@@ -183,14 +183,17 @@ static bool_t ktpd_session_process_cmd(ktpd_session_t *ktpd, faux_msg_t *msg)
|
|
|
}
|
|
|
|
|
|
if (rc) {
|
|
|
+ uint8_t retcode8bit = 0;
|
|
|
+ ack = ktp_msg_preform(cmd, KTP_STATUS_NONE);
|
|
|
+ retcode8bit = (uint8_t)(retcode & 0xff);
|
|
|
+ faux_msg_add_param(ack, KTP_PARAM_RETCODE, &retcode8bit, 1);
|
|
|
+ faux_msg_send_async(ack, ktpd->async);
|
|
|
+ faux_msg_free(ack);
|
|
|
+ } else {
|
|
|
char *err = faux_error_cstr(error);
|
|
|
ktpd_session_send_error(ktpd, cmd, err);
|
|
|
faux_str_free(err);
|
|
|
return BOOL_FALSE;
|
|
|
- } else {
|
|
|
- ack = ktp_msg_preform(cmd, KTP_STATUS_NONE);
|
|
|
- faux_msg_send_async(ack, ktpd->async);
|
|
|
- faux_msg_free(ack);
|
|
|
}
|
|
|
|
|
|
faux_error_free(error);
|
|
@@ -480,6 +483,7 @@ static bool_t wait_for_actions_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
|
|
|
pid_t child_pid = -1;
|
|
|
ktpd_session_t *ktpd = (ktpd_session_t *)user_data;
|
|
|
int retcode = -1;
|
|
|
+ uint8_t retcode8bit = 0;
|
|
|
faux_msg_t *ack = NULL;
|
|
|
ktp_cmd_e cmd = KTP_CMD_ACK;
|
|
|
|
|
@@ -507,6 +511,8 @@ static bool_t wait_for_actions_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
|
|
|
|
|
|
// Send ACK message
|
|
|
ack = ktp_msg_preform(cmd, KTP_STATUS_NONE);
|
|
|
+ retcode8bit = (uint8_t)(retcode & 0xff);
|
|
|
+ faux_msg_add_param(ack, KTP_PARAM_RETCODE, &retcode8bit, 1);
|
|
|
faux_msg_send_async(ack, ktpd->async);
|
|
|
faux_msg_free(ack);
|
|
|
|