- while((pdu = rpc->waitpdu) != NULL) {
- pdu->cb(rpc, RPC_STATUS_CANCEL, NULL, pdu->private_data);
- SLIST_REMOVE(&rpc->waitpdu, pdu);
- rpc_free_pdu(rpc, pdu);
+
+ for (i = 0; i < HASHES; i++) {
+ struct rpc_queue *q = &rpc->waitpdu[i];
+
+ while((pdu = q->head) != NULL) {
+ pdu->cb(rpc, RPC_STATUS_CANCEL, NULL, pdu->private_data);
+ LIBNFS_LIST_REMOVE(&q->head, pdu);
+ rpc_free_pdu(rpc, pdu);
+ }