- Timestamp:
- Dec 17, 2008, 5:12:37 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 1895c29
- Parents:
- 1631825
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/17/08 15:44:15)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/17/08 17:12:37)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
select.c
rc675b39 rf36cd97 133 133 d = (owl_dispatch*)owl_list_get_element(dl, elt); 134 134 owl_list_remove_element(dl, elt); 135 if (d-> pfunc) {136 owl_perlconfig_dispatch_free(d);135 if (d->destroy) { 136 d->destroy(d); 137 137 } 138 138 owl_free(d); … … 152 152 if (elt != -1) { 153 153 d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt); 154 if (d-> pfunc == NULL) {154 if (d->cfunc != owl_perlconfig_dispatch) { 155 155 /* don't mess with non-perl dispatch functions from here. */ 156 156 return 1; … … 160 160 d = malloc(sizeof(owl_dispatch)); 161 161 d->fd = fd; 162 d->cfunc = NULL; 163 d->pfunc = cb; 162 d->cfunc = owl_perlconfig_dispatch; 163 d->destroy = owl_perlconfig_dispatch_free; 164 d->data = cb; 164 165 owl_select_add_dispatch(d); 165 166 return 0; … … 174 175 if (elt != -1) { 175 176 d = (owl_dispatch*)owl_list_get_element(owl_global_get_dispatchlist(&g), elt); 176 if (d-> pfunc != NULL) {177 if (d->cfunc == owl_perlconfig_dispatch) { 177 178 owl_select_remove_dispatch(fd); 178 179 return 0; … … 216 217 if (d != NULL && FD_ISSET(d->fd, fds)) { 217 218 if (d->cfunc != NULL) { 218 (d->cfunc)(); 219 } 220 else if (d->pfunc != NULL) { 221 owl_perlconfig_do_dispatch(d); 219 d->cfunc(d); 222 220 } 223 221 }
Note: See TracChangeset
for help on using the changeset viewer.