- if (ret >= 0 && ct->task.error < 0) {
- switch(ct->task.error) {
- /* these are not errors */
- case -E_SERVER_CMD_SUCCESS:
- case -E_EOF:
- case -E_SERVER_EOF:
- case -E_BTR_EOF:
- ret = 0;
- break;
- default: ret = -E_SERVER_CMD_FAILURE;
+ if (ret >= 0) {
+ ret = task_status(ct->task);
+ if (ret < 0) {
+ switch (ret) {
+ /* these are not errors */
+ case -E_SERVER_CMD_SUCCESS:
+ case -E_EOF:
+ case -E_SERVER_EOF:
+ case -E_BTR_EOF:
+ ret = 0;
+ break;
+ default: ret = -E_SERVER_CMD_FAILURE;
+ }