Changeset 1273:0b026aea0bcb in roaraudio
- Timestamp:
- 02/27/09 16:39:59 (15 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/vio_cmd.h
r1269 r1273 44 44 #define ROAR_VIO_CMD_BUFSIZE 1024 45 45 46 #define ROAR_VIO_CMD_STATE_NONE 0 47 #define ROAR_VIO_CMD_STATE_OPEN 1 48 #define ROAR_VIO_CMD_STATE_CLOSING 2 49 #define ROAR_VIO_CMD_STATE_CLOSED 3 50 46 51 47 52 // for OpenPGP interface: … … 63 68 struct roar_vio_calls * next; 64 69 int options; 70 71 int state; 65 72 66 73 struct roar_vio_cmd_child reader; -
libroar/vio_cmd.c
r1271 r1273 72 72 state->next = dst; 73 73 state->options = options; 74 state->state = ROAR_VIO_CMD_STATE_OPEN; 74 75 75 76 // init calls … … 99 100 struct roar_vio_cmd_state * state = (struct roar_vio_cmd_state *)vio->inst; 100 101 102 state->state = ROAR_VIO_CMD_STATE_CLOSING; 103 101 104 if ( state->writer.opened ) { 102 105 if ( state->writer.out != -1 ) { … … 122 125 roar_vio_close(state->next); 123 126 127 // state->state = ROAR_VIO_CMD_STATE_CLOSED; 124 128 free(state); 125 129 … … 348 352 done = 0; 349 353 while (ret > 0) { 350 tv.tv_sec = 0; 351 tv.tv_usec = done ? 1 : 500000; // half a sec 354 if ( state->state == ROAR_VIO_CMD_STATE_CLOSING ) { 355 tv.tv_sec = 3600; 356 tv.tv_usec = 0; 357 } else { 358 tv.tv_sec = 0; 359 tv.tv_usec = done ? 1 : 50000; // 50ms 360 } 352 361 353 362 done++;
Note: See TracChangeset
for help on using the changeset viewer.