- Timestamp:
- Jul 23, 2009, 12:53:57 AM (16 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- ba6c8bd
- Parents:
- 029a8b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
select.c
rd43edd2 r4d86e06 90 90 len = owl_list_get_size(dl); 91 91 for(i = 0; i < len; i++) { 92 d = (owl_dispatch*)owl_list_get_element(dl, i);92 d = owl_list_get_element(dl, i); 93 93 if (d->fd == fd) return i; 94 94 } … … 102 102 103 103 dl = owl_global_get_dispatchlist(&g); 104 d = (owl_dispatch*)owl_list_get_element(dl, elt);104 d = owl_list_get_element(dl, elt); 105 105 owl_list_remove_element(dl, elt); 106 106 if (d->destroy) { … … 122 122 if (elt != -1) { /* If we have a dispatch for this FD */ 123 123 owl_dispatch *d_old; 124 d_old = (owl_dispatch*)owl_list_get_element(dl, elt);124 d_old = owl_list_get_element(dl, elt); 125 125 /* Ignore if we're adding the same dispatch again. Otherwise 126 126 replace the old dispatch. */ … … 145 145 /* Defer the removal until dispatch is done walking the list */ 146 146 dl = owl_global_get_dispatchlist(&g); 147 d = (owl_dispatch*)owl_list_get_element(dl, elt);147 d = owl_list_get_element(dl, elt); 148 148 d->needs_gc = 1; 149 149 } else { … … 163 163 elt = owl_select_find_dispatch(fd); 164 164 if (elt != -1) { 165 d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);165 d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt); 166 166 if (d->cfunc != owl_perlconfig_dispatch) { 167 167 /* don't mess with non-perl dispatch functions from here. */ … … 186 186 elt = owl_select_find_dispatch(fd); 187 187 if (elt != -1) { 188 d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt);188 d = owl_list_get_element(owl_global_get_dispatchlist(&g), elt); 189 189 if (d->cfunc == owl_perlconfig_dispatch) { 190 190 owl_select_remove_dispatch_at(elt); … … 207 207 len = owl_select_dispatch_count(g); 208 208 for(i = 0; i < len; i++) { 209 d = (owl_dispatch*)owl_list_get_element(dl, i);209 d = owl_list_get_element(dl, i); 210 210 FD_SET(d->fd, r); 211 211 FD_SET(d->fd, e); … … 245 245 246 246 for(i = 0; i < len; i++) { 247 d = (owl_dispatch*)owl_list_get_element(dl, i);247 d = owl_list_get_element(dl, i); 248 248 /* While d shouldn't normally be null, the list may be altered by 249 249 * functions we dispatch to. */
Note: See TracChangeset
for help on using the changeset viewer.