Changeset 12e291a
- Timestamp:
- Oct 19, 2009, 10:16:54 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 0697f09
- Parents:
- dbf94e9
- git-author:
- Alejandro R. Sedeño <asedeno@mit.edu> (10/13/09 03:14:02)
- git-committer:
- Alejandro R. Sedeño <asedeno@mit.edu> (10/19/09 22:16:54)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
rcc1a6d4 r12e291a 135 135 } 136 136 137 perl = owl_perlconfig_execute("BarnOwl::Zephyr::_zephyr_startup()"); 138 owl_free(perl); 137 perl = owl_perlconfig_execute("BarnOwl::Zephyr::_zephyr_startup()"); 138 owl_free(perl); 139 140 owl_select_add_pre_select_action(owl_zephyr_pre_select_action, NULL, NULL); 139 141 } 140 142 … … 1305 1307 } 1306 1308 1307 #ifdef HAVE_LIBZEPHYR 1308 void owl_zephyr_process_events(owl_dispatch *d) { 1309 /* 1310 * Process zephyrgrams from libzephyr's queue. To prevent starvation, 1311 * process a maximum of OWL_MAX_ZEPHYRGRAMS_TO_PROCESS. 1312 * 1313 * Returns the number of zephyrgrams processed. 1314 */ 1315 1316 #define OWL_MAX_ZEPHYRGRAMS_TO_PROCESS 20 1317 1318 int _owl_zephyr_process_events(void) /* noproto */ 1319 { 1309 1320 int zpendcount=0; 1321 #ifdef HAVE_LIBZEPHYR 1310 1322 ZNotice_t notice; 1311 1323 owl_message *m=NULL; 1312 1324 1313 while(owl_zephyr_zpending() && zpendcount < 20) {1325 while(owl_zephyr_zpending() && zpendcount < OWL_MAX_ZEPHYRGRAMS_TO_PROCESS) { 1314 1326 if (owl_zephyr_zpending()) { 1315 1327 ZReceiveNotice(¬ice, NULL); … … 1334 1346 } 1335 1347 } 1336 } 1337 1338 #else 1339 void owl_zephyr_process_events(owl_dispatch *d) { 1340 1341 } 1342 #endif 1348 #endif 1349 return zpendcount; 1350 } 1351 1352 void owl_zephyr_process_events(owl_dispatch *d) 1353 { 1354 _owl_zephyr_process_events(); 1355 } 1356 1357 int owl_zephyr_pre_select_action(owl_ps_action *a, void *p) 1358 { 1359 return _owl_zephyr_process_events(); 1360 }
Note: See TracChangeset
for help on using the changeset viewer.