Changeset 5109:4f9fc788fe91 in roaraudio for roarclients
- Timestamp:
- 07/28/11 16:32:34 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roarclients
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/Makefile
r4980 r5109 1 TARGETS_DEVEL=roartypes roar socktypes roar-config1 TARGETS_DEVEL=roartypes roar-config 2 2 TARGETS_EXAMPLE=roarvorbis roarsin 3 3 TARGETS_IO=roarcat roarcatplay roarcatvio roarbidir roarmon roarmonhttp roarradio … … 8 8 TARGETS_VIO=roarvio 9 9 10 TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest11 TARGETS_OLD=roarcatad roarcat2sock roarcatsendfile roarcatpassfh 10 #TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest 11 #TARGETS_OLD=roarcatad roarcat2sock roarcatsendfile roarcatpassfh roarsocktypes 12 12 13 13 TARGETS=$(TARGETS_IO) $(TARGETS_CTL) $(TARGETS_DSP) $(TARGETS_MISC) $(TARGETS_DEVEL) $(TARGETS_EXAMPLE) $(TARGETS_M) $(TARGETS_VIO) -
roarclients/roarcat.c
r5021 r5109 187 187 } 188 188 189 if ( roar_stream_connect (&con, &s, dir) == -1 ) {189 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 190 190 fprintf(stderr, "Error: can not connect stream to server\n"); 191 191 roar_disconnect(&con); … … 205 205 } 206 206 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 } 208 213 209 214 roar_vio_close(stream); -
roarclients/roarcat2sock.c
r4708 r5109 55 55 56 56 57 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 58 57 59 for (i = 1; i < argc; i++) { 58 60 k = argv[i]; -
roarclients/roarcatad.c
r4708 r5109 56 56 57 57 58 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 59 58 60 for (i = 1; i < argc; i++) { 59 61 k = argv[i]; … … 87 89 } 88 90 89 if ( roar_stream_connect (&con, &s, ROAR_DIR_PLAY) == -1 ) {91 if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 90 92 roar_disconnect(&con); 91 93 return 1; -
roarclients/roarcatpassfh.c
r4914 r5109 56 56 57 57 58 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 59 58 60 for (i = 1; i < argc; i++) { 59 61 k = argv[i]; … … 89 91 } 90 92 91 if ( roar_stream_connect (&con, &s, ROAR_DIR_PLAY) == -1 ) {93 if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 92 94 roar_disconnect(&con); 93 95 return 1; -
roarclients/roarcatplay.c
r5022 r5109 96 96 #endif 97 97 98 if ( mode == MODE_PASSIVE ) { 99 fprintf(stderr, "Warning: passive mode is obsoleted and will be removed soon.\n"); 100 } 101 98 102 if ( file == NULL ) 99 103 file = "/dev/stdin"; -
roarclients/roarcatsendfile.c
r4708 r5109 54 54 int in = -1; 55 55 56 roar_debug_bin_obsolete(argv[0], "roarcat", NULL); 57 56 58 for (i = 1; i < argc; i++) { 57 59 k = argv[i]; -
roarclients/roarinterconnect.c
r4928 r5109 501 501 } 502 502 503 if ( roar_stream_connect (con, stream, localdir) == -1 ) {503 if ( roar_stream_connect2(con, stream, localdir, -1) == -1 ) { 504 504 roar_disconnect(con); 505 505 return 22; -
roarclients/roarmon.c
r4885 r5109 198 198 } 199 199 200 if ( roar_stream_connect (&con, &s, dir) == -1 ) {200 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 201 201 fprintf(stderr, "Error: can not connect stream to server\n"); 202 202 roar_disconnect(&con); … … 227 227 // ROAR_SHUTDOWN(fh, SHUT_WR); // we need to have something do do shutdowns here... 228 228 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 } 230 235 231 236 roar_vio_close(stream); -
roarclients/roarmonhttp.c
r5009 r5109 331 331 } 332 332 333 if ( roar_stream_connect (&con, &s, dir) == -1 ) {333 if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 334 334 roar_disconnect(&con); 335 335 return 11; -
roarclients/roarradio.c
r4740 r5109 211 211 } 212 212 213 if ( roar_stream_connect (con, stream, ROAR_DIR_PLAY) == -1 ) {213 if ( roar_stream_connect2(con, stream, ROAR_DIR_PLAY, -1) == -1 ) { 214 214 roar_disconnect(con); 215 215 return 1; -
roarclients/roarsocktypes.c
r4708 r5109 26 26 #include <roaraudio.h> 27 27 28 int main ( void) {28 int main (int argc, char * argv[]) { 29 29 int i, fh; 30 30 struct { … … 44 44 }; 45 45 46 roar_debug_bin_obsolete(argv[0], NULL, NULL); 47 46 48 for (i = 0; tests[i].func; i++) { 47 49 printf("Type %-16s ", tests[i].name); -
roarclients/roarvio.c
r4927 r5109 53 53 } 54 54 55 int do_explain (struct roar_vio_calls * cur) {55 ssize_t do_explain (struct roar_vio_calls * cur) { 56 56 struct roar_sockname sockname; 57 57 int have_sockname; … … 161 161 struct roar_vio_calls vio0, vio1; 162 162 enum action action = READ; 163 ssize_t written = -1; 163 164 int i; 164 165 char * k; … … 247 248 switch (action) { 248 249 case READ: 249 roar_vio_copy_data(roar_stdout, &vio0);250 written = roar_vio_copy_data(roar_stdout, &vio0); 250 251 break; 251 252 case WRITE: 252 roar_vio_copy_data(&vio0, roar_stdin);253 written = roar_vio_copy_data(&vio0, roar_stdin); 253 254 break; 254 255 case PASS: 255 roar_vio_copy_data(&vio1, &vio0);256 written = roar_vio_copy_data(&vio1, &vio0); 256 257 break; 257 258 case EXPLAIN: 258 if ( do_explain(&vio0) == -1 )259 if ( (written = do_explain(&vio0)) == -1 ) 259 260 ret = 4; 260 261 break; 261 262 } 262 263 263 if ( roar_error != ROAR_ERROR_NONE) {264 if ( written == -1 ) { 264 265 ROAR_ERR("Can not push data: %s", roar_error2str(roar_error)); 265 266 }
Note: See TracChangeset
for help on using the changeset viewer.