Changeset 508:1129ff87dd1e in roaraudio for roard


Ignore:
Timestamp:
08/15/08 00:40:31 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added DECnet listen support, introused -n/--decnet to roard, added woraround to Linux DECnet stack bugs on streams and added some helpfull DECnet macros, puh...

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r501 r508  
    4646 printf(" -t  --tcp             - Use TCP listen socket\n" 
    4747        " -u  --unix            - Use UNIX Domain listen socket (default)\n" 
     48#ifdef ROAR_HAVE_LIBDNET 
     49        " -n  --decnet          - use DECnet listen socket\n" 
     50#endif 
    4851        " -p  --port            - TCP Port to bind to\n" 
    4952        " -b  --bind            - IP/Hostname to bind to\n" 
     
    9295 DRIVER_USERDATA_T drvinst; 
    9396 struct roar_client * self = NULL; 
     97#ifdef ROAR_HAVE_LIBDNET 
     98 char decnethost[80]; 
     99#endif 
    94100 
    95101 g_listen_socket = -1; 
     
    217223  } else if ( strcmp(k, "-u") == 0 ) { 
    218224   // ignore this case as it is the default behavor. 
     225  } else if ( strcmp(k, "-n") == 0 ) { 
     226#ifdef ROAR_HAVE_LIBDNET 
     227    port   = ROAR_DEFAULT_NUM; 
     228    strcpy(decnethost, ROAR_DEFAULT_LISTEN_OBJECT); 
     229    server = decnethost; 
     230#else 
     231    ROAR_ERR("No DECnet support compiled in!"); 
     232    return 1; 
     233#endif 
    219234  } else if ( strcmp(k, "-G") == 0 ) { 
    220235   sock_grp  = argv[++i]; 
  • roard/streams.c

    r495 r508  
    522522int streams_check  (int id) { 
    523523 int fh; 
    524  ssize_t req; 
     524 ssize_t req, realreq, done; 
    525525 struct roar_stream        *   s; 
    526526 struct roar_stream_server *  ss; 
     
    557557 
    558558 if ( ss->codecfilter == -1 ) { 
     559  realreq = req; 
     560/* 
    559561  req = read(fh, buf, req); 
     562  if ( req < realreq ) { // we can do this as the stream is in nonblocking mode! 
     563   if ( (realreq = read(fh, buf+req, realreq-req)) > 0 ) 
     564    req += realreq; 
     565  } 
     566*/ 
     567  done = 0; 
     568  while (req > 0 && done != realreq) { 
     569   if ( (req = read(fh, buf+done, realreq-done)) > 0 ) 
     570    done += req; 
     571  } 
     572  req = done; 
    560573 } else { 
    561574  req = codecfilter_read(ss->codecfilter_inst, ss->codecfilter, buf, req); 
Note: See TracChangeset for help on using the changeset viewer.