change deal_report_req_receipt parameters type

connection_manager
YuQing 2020-09-20 21:51:20 +08:00
parent db6a189fde
commit 4989e9d267
2 changed files with 6 additions and 5 deletions

View File

@ -48,7 +48,8 @@ int sf_server_deal_setup_channel(struct fast_task_info *task,
key = buff2int(req->key); key = buff2int(req->key);
if (*channel != NULL) { if (*channel != NULL) {
response->error.length = sprintf(response->error.message, response->error.length = sprintf(response->error.message,
"channel already setup, the channel id: %d", (*channel)->id); "channel already setup, the channel id: %d, task type: %d",
(*channel)->id, *task_type);
return EEXIST; return EEXIST;
} }
@ -106,7 +107,7 @@ int sf_server_deal_close_channel(struct fast_task_info *task,
} }
int sf_server_deal_report_req_receipt(struct fast_task_info *task, int sf_server_deal_report_req_receipt(struct fast_task_info *task,
int *task_type, IdempotencyChannel **channel, const int task_type, IdempotencyChannel *channel,
SFResponseInfo *response) SFResponseInfo *response)
{ {
int result; int result;
@ -119,7 +120,7 @@ int sf_server_deal_report_req_receipt(struct fast_task_info *task,
SFProtoReportReqReceiptBody *body_part; SFProtoReportReqReceiptBody *body_part;
SFProtoReportReqReceiptBody *body_end; SFProtoReportReqReceiptBody *body_end;
if ((result=check_holder_channel(*task_type, *channel, response)) != 0) { if ((result=check_holder_channel(task_type, channel, response)) != 0) {
return result; return result;
} }
@ -147,7 +148,7 @@ int sf_server_deal_report_req_receipt(struct fast_task_info *task,
body_end = body_part + count; body_end = body_part + count;
for (; body_part < body_end; body_part++) { for (; body_part < body_end; body_part++) {
req_id = buff2long(body_part->req_id); req_id = buff2long(body_part->req_id);
if (idempotency_channel_remove_request(*channel, req_id) == 0) { if (idempotency_channel_remove_request(channel, req_id) == 0) {
success++; success++;
} }
} }

View File

@ -18,7 +18,7 @@ int sf_server_deal_close_channel(struct fast_task_info *task,
SFResponseInfo *response); SFResponseInfo *response);
int sf_server_deal_report_req_receipt(struct fast_task_info *task, int sf_server_deal_report_req_receipt(struct fast_task_info *task,
int *task_type, IdempotencyChannel **channel, const int task_type, IdempotencyChannel *channel,
SFResponseInfo *response); SFResponseInfo *response);
IdempotencyRequest *sf_server_update_prepare_and_check( IdempotencyRequest *sf_server_update_prepare_and_check(