Changeset 5109:4f9fc788fe91 in roaraudio for roarclients


Ignore:
Timestamp:
07/28/11 16:32:34 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Started to use compiler attributes (Also see: #130)

Location:
roarclients
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • roarclients/Makefile

    r4980 r5109  
    1 TARGETS_DEVEL=roartypes roarsocktypes roar-config 
     1TARGETS_DEVEL=roartypes roar-config 
    22TARGETS_EXAMPLE=roarvorbis roarsin 
    33TARGETS_IO=roarcat roarcatplay roarcatvio roarbidir roarmon roarmonhttp roarradio 
     
    88TARGETS_VIO=roarvio 
    99 
    10 TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest 
    11 TARGETS_OLD=roarcatad roarcat2sock roarcatsendfile roarcatpassfh 
     10#TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest 
     11#TARGETS_OLD=roarcatad roarcat2sock roarcatsendfile roarcatpassfh roarsocktypes 
    1212 
    1313TARGETS=$(TARGETS_IO) $(TARGETS_CTL) $(TARGETS_DSP) $(TARGETS_MISC) $(TARGETS_DEVEL) $(TARGETS_EXAMPLE) $(TARGETS_M) $(TARGETS_VIO) 
  • roarclients/roarcat.c

    r5021 r5109  
    187187 } 
    188188 
    189  if ( roar_stream_connect(&con, &s, dir) == -1 ) { 
     189 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
    190190  fprintf(stderr, "Error: can not connect stream to server\n"); 
    191191  roar_disconnect(&con); 
     
    205205 } 
    206206 
    207  roar_vio_copy_data(stream, &file); 
     207 if ( roar_vio_copy_data(stream, &file) == -1 ) { 
     208  fprintf(stderr, "Error: can not copy data from source to server.\n"); 
     209  roar_vio_close(stream); 
     210  roar_vio_close(&file); 
     211  return 14; 
     212 } 
    208213 
    209214 roar_vio_close(stream); 
  • roarclients/roarcat2sock.c

    r4708 r5109  
    5555 
    5656 
     57 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 
     58 
    5759 for (i = 1; i < argc; i++) { 
    5860  k = argv[i]; 
  • roarclients/roarcatad.c

    r4708 r5109  
    5656 
    5757 
     58 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 
     59 
    5860 for (i = 1; i < argc; i++) { 
    5961  k = argv[i]; 
     
    8789 } 
    8890 
    89  if ( roar_stream_connect(&con, &s, ROAR_DIR_PLAY) == -1 ) { 
     91 if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
    9092  roar_disconnect(&con); 
    9193  return 1; 
  • roarclients/roarcatpassfh.c

    r4914 r5109  
    5656 
    5757 
     58 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 
     59 
    5860 for (i = 1; i < argc; i++) { 
    5961  k = argv[i]; 
     
    8991 } 
    9092 
    91  if ( roar_stream_connect(&con, &s, ROAR_DIR_PLAY) == -1 ) { 
     93 if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
    9294  roar_disconnect(&con); 
    9395  return 1; 
  • roarclients/roarcatplay.c

    r5022 r5109  
    9696#endif 
    9797 
     98 if ( mode == MODE_PASSIVE ) { 
     99  fprintf(stderr, "Warning: passive mode is obsoleted and will be removed soon.\n"); 
     100 } 
     101 
    98102 if ( file == NULL ) 
    99103  file = "/dev/stdin"; 
  • roarclients/roarcatsendfile.c

    r4708 r5109  
    5454 int    in = -1; 
    5555 
     56 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 
     57 
    5658 for (i = 1; i < argc; i++) { 
    5759  k = argv[i]; 
  • roarclients/roarinterconnect.c

    r4928 r5109  
    501501 } 
    502502 
    503  if ( roar_stream_connect(con, stream, localdir) == -1 ) { 
     503 if ( roar_stream_connect2(con, stream, localdir, -1) == -1 ) { 
    504504  roar_disconnect(con); 
    505505  return 22; 
  • roarclients/roarmon.c

    r4885 r5109  
    198198 } 
    199199 
    200  if ( roar_stream_connect(&con, &s, dir) == -1 ) { 
     200 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
    201201  fprintf(stderr, "Error: can not connect stream to server\n"); 
    202202  roar_disconnect(&con); 
     
    227227// ROAR_SHUTDOWN(fh, SHUT_WR); // we need to have something do do shutdowns here... 
    228228 
    229  roar_vio_copy_data(&file, stream); 
     229 if ( roar_vio_copy_data(&file, stream) == -1 ) { 
     230  fprintf(stderr, "Error: can not copy data from stream to destination\n"); 
     231  roar_vio_close(stream); 
     232  roar_vio_close(&file); 
     233  return 14; 
     234 } 
    230235 
    231236 roar_vio_close(stream); 
  • roarclients/roarmonhttp.c

    r5009 r5109  
    331331 } 
    332332 
    333  if ( roar_stream_connect(&con, &s, dir) == -1 ) { 
     333 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
    334334  roar_disconnect(&con); 
    335335  return 11; 
  • roarclients/roarradio.c

    r4740 r5109  
    211211 } 
    212212 
    213  if ( roar_stream_connect(con, stream, ROAR_DIR_PLAY) == -1 ) { 
     213 if ( roar_stream_connect2(con, stream, ROAR_DIR_PLAY, -1) == -1 ) { 
    214214  roar_disconnect(con); 
    215215  return 1; 
  • roarclients/roarsocktypes.c

    r4708 r5109  
    2626#include <roaraudio.h> 
    2727 
    28 int main (void) { 
     28int main (int argc, char * argv[]) { 
    2929 int i, fh; 
    3030 struct { 
     
    4444 }; 
    4545 
     46 roar_debug_bin_obsolete(argv[0], NULL, NULL); 
     47 
    4648 for (i = 0; tests[i].func; i++) { 
    4749  printf("Type %-16s ", tests[i].name); 
  • roarclients/roarvio.c

    r4927 r5109  
    5353} 
    5454 
    55 int do_explain (struct roar_vio_calls * cur) { 
     55ssize_t do_explain (struct roar_vio_calls * cur) { 
    5656 struct roar_sockname sockname; 
    5757 int                  have_sockname; 
     
    161161 struct roar_vio_calls vio0, vio1; 
    162162 enum action action = READ; 
     163 ssize_t written = -1; 
    163164 int i; 
    164165 char * k; 
     
    247248 switch (action) { 
    248249  case READ: 
    249     roar_vio_copy_data(roar_stdout, &vio0); 
     250    written = roar_vio_copy_data(roar_stdout, &vio0); 
    250251   break; 
    251252  case WRITE: 
    252     roar_vio_copy_data(&vio0, roar_stdin); 
     253    written = roar_vio_copy_data(&vio0, roar_stdin); 
    253254   break; 
    254255  case PASS: 
    255     roar_vio_copy_data(&vio1, &vio0); 
     256    written = roar_vio_copy_data(&vio1, &vio0); 
    256257   break; 
    257258  case EXPLAIN: 
    258     if ( do_explain(&vio0) == -1 ) 
     259    if ( (written = do_explain(&vio0)) == -1 ) 
    259260     ret = 4; 
    260261   break; 
    261262 } 
    262263 
    263  if ( roar_error != ROAR_ERROR_NONE ) { 
     264 if ( written == -1 ) { 
    264265  ROAR_ERR("Can not push data: %s", roar_error2str(roar_error)); 
    265266 } 
Note: See TracChangeset for help on using the changeset viewer.