Changeset 370 for branches/samba-3.3.x/source/smbd/blocking.c
- Timestamp:
- Jan 15, 2010, 8:23:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/smbd/blocking.c
r206 r370 95 95 96 96 /**************************************************************************** 97 We need a version of timeval_min that treats zero timval as infinite. 98 ****************************************************************************/ 99 100 static struct timeval timeval_brl_min(const struct timeval *tv1, 101 const struct timeval *tv2) 102 { 103 if (timeval_is_zero(tv1)) { 104 return *tv2; 105 } 106 if (timeval_is_zero(tv2)) { 107 return *tv1; 108 } 109 return timeval_min(tv1, tv2); 110 } 111 112 /**************************************************************************** 97 113 After a change to blocking_lock_queue, recalculate the timed_event for the 98 114 next processing. … … 117 133 if (brl->blocking_pid == 0xFFFFFFFF) { 118 134 struct timeval psx_to = timeval_current_ofs(10, 0); 119 next_timeout = timeval_ min(&next_timeout, &psx_to);135 next_timeout = timeval_brl_min(&next_timeout, &psx_to); 120 136 } 121 137 … … 123 139 } 124 140 125 if (timeval_is_zero(&next_timeout)) { 126 next_timeout = brl->expire_time; 127 } 128 else { 129 next_timeout = timeval_min(&next_timeout, 130 &brl->expire_time); 131 } 141 next_timeout = timeval_brl_min(&next_timeout, &brl->expire_time); 132 142 } 133 143 … … 687 697 struct timeval tv_curr = timeval_current(); 688 698 blocking_lock_record *blr, *next = NULL; 689 bool recalc_timeout = False;690 699 691 700 /* … … 737 746 DLIST_REMOVE(blocking_lock_queue, blr); 738 747 free_blocking_lock_record(blr); 739 recalc_timeout = True;740 748 continue; 741 749 } … … 762 770 DLIST_REMOVE(blocking_lock_queue, blr); 763 771 free_blocking_lock_record(blr); 764 recalc_timeout = True;765 772 change_to_root_user(); 766 773 continue; … … 788 795 DLIST_REMOVE(blocking_lock_queue, blr); 789 796 free_blocking_lock_record(blr); 790 recalc_timeout = True;791 797 change_to_root_user(); 792 798 continue; … … 824 830 DLIST_REMOVE(blocking_lock_queue, blr); 825 831 free_blocking_lock_record(blr); 826 recalc_timeout = True; 827 } 828 } 829 830 if (recalc_timeout) { 831 recalc_brl_timeout(); 832 } 832 } 833 } 834 835 recalc_brl_timeout(); 833 836 } 834 837
Note:
See TracChangeset
for help on using the changeset viewer.