Changeset 1498:0e9ec20bf506 in roaraudio


Ignore:
Timestamp:
03/31/09 20:47:44 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

corrected use of FDATASYNC and SHUTDOWN, check for ROAR_SUPPORT_META and ROAR_SUPPORT_LISTEN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/streams.c

    r1245 r1498  
    5252 struct roar_stream_server * s = NULL; 
    5353 
     54#ifdef ROAR_SUPPORT_LISTEN 
    5455 if ( g_terminate && !g_no_listen ) // don't accept new streams in case of termination state 
    5556  return -1; 
     57#else 
     58 if ( g_terminate )                 // don't accept new streams in case of termination state 
     59  return -1; 
     60#endif 
    5661 
    5762 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
     
    9297    s->mixer.mixer[j] = 65535; 
    9398 
     99#ifdef ROAR_SUPPORT_META 
    94100   for (j = 0; j < ROAR_META_MAX_PER_STREAM; j++) { 
    95101    s->meta[j].type   = ROAR_META_TYPE_NONE; 
     
    97103    s->meta[j].value  = NULL; 
    98104   } 
     105#endif 
    99106 
    100107   roar_vio_init_calls(&(s->vio)); 
     
    125132 ROAR_DBG("streams_delete(id=%i): g_streams[id]->id=%i", id, ROAR_STREAM(s)->id); 
    126133 
     134#ifdef ROAR_SUPPORT_META 
    127135 // delete meta data form other meta streams if needed 
    128136 if ( streams_get_flag(id, ROAR_FLAG_META) == 1 ) { 
     
    131139  stream_meta_finalize(id); 
    132140 } 
     141#endif 
    133142 
    134143 if ( s->codecfilter != -1 ) { 
     
    229238 
    230239 if ( dir == ROAR_DIR_MONITOR || dir == ROAR_DIR_RECORD || dir == ROAR_DIR_OUTPUT ) { 
    231   shutdown(fh, SHUT_RD); 
     240  ROAR_SHUTDOWN(fh, SHUT_RD); 
    232241 } 
    233242 
     
    294303   return -1; 
    295304 
     305#ifdef ROAR_FDATASYNC 
    296306  ROAR_FDATASYNC(fh); 
     307#endif 
    297308 
    298309  return 0; 
     
    318329 g_streams[id]->flags |= flag; 
    319330 
     331#ifdef ROAR_SUPPORT_META 
    320332 if ( flag & ROAR_FLAG_META ) 
    321333  stream_meta_finalize(id); 
     334#endif 
    322335 
    323336 return 0; 
Note: See TracChangeset for help on using the changeset viewer.