MS_DBG_RETVM_IF(!MS_STRING_VALID(recv_msg->msg), MS_MEDIA_ERR_INVALID_PARAMETER, "msg is NULL");
MS_DBG_RETVM_IF(!owner_list, MS_MEDIA_ERR_INTERNAL, "owner_list is NULL");
- for (i = 0; i < owner_list->len; i++) {
- data = g_array_index(owner_list, ms_req_owner_data*, i);
- if (data->pid == pid && strcmp(data->req_path, recv_msg->msg) == 0) {
- ms_ipc_send_msg_to_client_tcp(data->client_sockfd, recv_msg, NULL);
- if (recv_msg->msg_type != MS_MSG_SCANNER_PARTIAL)
- g_array_remove_index(owner_list, i);
-
- break;
+ if (recv_msg->msg_type == MS_MSG_SCANNER_PARTIAL) {
+ for (i = 0; i < owner_list->len; i++) {
+ data = g_array_index(owner_list, ms_req_owner_data*, i);
+ if (strcmp(data->req_path, recv_msg->msg) == 0) {
+ MS_DBG_SERR("PARTIAL message:pid %d,path %s", data->pid, data->req_path);
+ ms_ipc_send_msg_to_client_tcp(data->client_sockfd, recv_msg, NULL);
+ }
+ }
+ } else {
+ for (i = 0; i < owner_list->len; i++) {
+ data = g_array_index(owner_list, ms_req_owner_data*, i);
+ if (data->pid == pid && strcmp(data->req_path, recv_msg->msg) == 0) {
+ ms_ipc_send_msg_to_client_tcp(data->client_sockfd, recv_msg, NULL);
+ if (recv_msg->msg_type != MS_MSG_SCANNER_COMPLETE)
+ g_array_remove_index(owner_list, i);
+
+ break;
+ }
}
}