rx: Fix test for end of call queue for LWP
[openafs.git] / src / rx / rx.c
index 8fe51b6..abeda0a 100644 (file)
@@ -2237,9 +2237,8 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
            service = tcall->conn->service;
            if (QuotaOK(service)) {
                MUTEX_ENTER(&rx_pthread_mutex);
-               /* XXX - If tcall->entry.next is NULL, then we're no longer
-                * on a queue at all. This shouldn't happen. */
-               if (tno == rxi_fcfs_thread_num || !tcall->entry.next) {
+               if (tno == rxi_fcfs_thread_num
+                       || opr_queue_IsEnd(&rx_incomingCallQueue, cursor)) {
                    MUTEX_EXIT(&rx_pthread_mutex);
                    /* If we're the fcfs thread, then  we'll just use
                     * this call. If we haven't been able to find an optimal