Changeset 4948:29b5b41a1ca2 in roaraudio for libroar/client.c


Ignore:
Timestamp:
05/10/11 01:41:14 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

a first (not yet fully working) patch for non-stream execs (see #32)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/client.c

    r4708 r4948  
    128128} 
    129129 
     130int roar_client_exec     (struct roar_connection * con, struct roar_client * client, uint16_t flags) { 
     131 struct roar_message m; 
     132 int16_t * d = (int16_t *)m.data; 
     133 int i; 
     134 
     135 memset(&m,  0, sizeof(m)); 
     136 
     137 m.cmd     = ROAR_CMD_EXEC_STREAM; 
     138 m.stream  =  -1; // client (non-stream) passs 
     139 m.pos     =   0; 
     140 m.datalen = 4*2; 
     141 
     142 d[0] = 0; // version 
     143 d[1] = flags; 
     144 d[2] = client->proto; 
     145 d[3] = client->byteorder; 
     146 
     147 for (i = 0; i < 4; i++) 
     148  d[i] = ROAR_HOST2NET16(d[i]); 
     149 
     150 if ( roar_req(con, &m, NULL) == -1 ) 
     151  return -1; 
     152 
     153 client->fh = roar_get_connection_fh(con); 
     154 
     155 return 0; 
     156} 
     157 
    130158//ll 
Note: See TracChangeset for help on using the changeset viewer.