Changeset 78:997d49ae275a in roaraudio


Ignore:
Timestamp:
07/12/08 18:06:43 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added basic support to connect to streams of existing clients

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/clients.c

    r71 r78  
    293293} 
    294294 
     295int client_stream_set_fh (int client, int stream, int fh) { 
     296 int i; 
     297 
     298 if ( g_clients[client] == NULL ) 
     299  return -1; 
     300 
     301 for (i = 0; i < ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT; i++) { 
     302  if ( g_clients[client]->streams[i] == stream ) { 
     303   streams_set_fh(stream, fh); 
     304   return 0; 
     305  } 
     306 } 
     307 
     308 return -1; 
     309} 
     310 
    295311int client_stream_add    (int client, int stream) { 
    296312 int i; 
  • roard/include/client.h

    r0 r78  
    4848 
    4949int client_stream_exec   (int client, int stream); 
     50int client_stream_set_fh (int client, int stream, int fh); 
    5051int client_stream_add    (int client, int stream); 
    5152int client_stream_delete (int client, int stream); 
  • roard/req.c

    r77 r78  
    119119  return -1; 
    120120 
    121  close(fh); 
     121 if ( client_stream_set_fh(client, mes->stream, fh) == -1 ) { 
     122  close(fh); 
     123  return 1; 
     124 } 
     125 
     126 return 0; 
     127 
     128 mes->datalen = 0; 
     129 mes->cmd     = ROAR_CMD_OK; 
    122130} 
    123131 
Note: See TracChangeset for help on using the changeset viewer.