|
@@ -421,8 +421,14 @@ static bool_t ktp_session_process_cmd_ack(ktp_session_t *ktp, const faux_msg_t *
|
|
|
// Server will not send retcode in a case of empty command. Empty command
|
|
|
// doesn't execute real actions
|
|
|
if (faux_msg_get_param_by_type(msg, KTP_PARAM_RETCODE,
|
|
|
- (void **)&retcode8bit, NULL))
|
|
|
+ (void **)&retcode8bit, NULL)) {
|
|
|
ktp->cmd_retcode = (int)(*retcode8bit);
|
|
|
+ } else {
|
|
|
+ if (KTP_STATUS_IS_ERROR(status))
|
|
|
+ ktp->cmd_retcode = -1;
|
|
|
+ else
|
|
|
+ ktp->cmd_retcode = 0;
|
|
|
+ }
|
|
|
error_str = faux_msg_get_str_param_by_type(msg, KTP_PARAM_ERROR);
|
|
|
if (error_str) {
|
|
|
faux_error_add(ktp->error, error_str);
|