Changeset 1273:0b026aea0bcb in roaraudio


Ignore:
Timestamp:
02/27/09 16:39:59 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

wait extra long to sync in case of a closeing sync

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio_cmd.h

    r1269 r1273  
    4444#define ROAR_VIO_CMD_BUFSIZE        1024 
    4545 
     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 
    4651 
    4752// for OpenPGP interface: 
     
    6368 struct roar_vio_calls * next; 
    6469 int options; 
     70 
     71 int state; 
    6572 
    6673 struct roar_vio_cmd_child reader; 
  • libroar/vio_cmd.c

    r1271 r1273  
    7272 state->next    = dst; 
    7373 state->options = options; 
     74 state->state   = ROAR_VIO_CMD_STATE_OPEN; 
    7475 
    7576 // init calls 
     
    99100 struct roar_vio_cmd_state * state = (struct roar_vio_cmd_state *)vio->inst; 
    100101 
     102 state->state = ROAR_VIO_CMD_STATE_CLOSING; 
     103 
    101104 if ( state->writer.opened ) { 
    102105  if ( state->writer.out != -1 ) { 
     
    122125 roar_vio_close(state->next); 
    123126 
     127// state->state = ROAR_VIO_CMD_STATE_CLOSED; 
    124128 free(state); 
    125129 
     
    348352   done = 0; 
    349353   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    } 
    352361 
    353362    done++; 
Note: See TracChangeset for help on using the changeset viewer.