Changeset 84:cd538d13337e in roaraudio for roard
- Timestamp:
- 07/12/08 21:55:02 (16 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/clients.c
r78 r84 135 135 if ( fh > max_fh ) 136 136 max_fh = fh; 137 } else {138 139 140 141 142 143 144 145 146 }137 } 138 139 for (j = 0; j < ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT; j++) { 140 if ( (fh = streams_get_fh(g_clients[i]->streams[j])) != -1 ) { 141 FD_SET(fh, &r); 142 143 if ( fh > max_fh ) 144 max_fh = fh; 145 } 146 //printf("D: client=%i, stream=%i, fh=%i\n", i, j, fh); 147 147 } 148 148 … … 166 166 } 167 167 168 if ( FD_ISSET(fh, &e) ) 168 if ( FD_ISSET(fh, &e) ) { 169 169 clients_delete(i); 170 } else { 171 for (j = 0; j < ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT; j++) { 172 if ( (fh = streams_get_fh(g_clients[i]->streams[j])) != -1 ) { 173 if ( FD_ISSET(fh, &r) ) { 174 streams_check(g_clients[i]->streams[j]); 175 } 170 continue; 171 } 172 } 173 174 if ( g_clients[i] == NULL ) 175 continue; 176 177 for (j = 0; j < ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT; j++) { 178 //printf("D: client=%i, stream=%i, g_clients[i=%i] = %p\n", i, j, i, g_clients[i]); 179 if ( (fh = streams_get_fh(g_clients[i]->streams[j])) != -1 ) { 180 if ( FD_ISSET(fh, &r) ) { 181 streams_check(g_clients[i]->streams[j]); 176 182 } 177 183 } -
roard/req.c
r80 r84 107 107 len = mes->datalen - 4; 108 108 109 strnc mp(host, &(mes->data[4]), len);109 strncpy(host, &(mes->data[4]), len); 110 110 host[len] = 0; 111 111 -
roard/streams.c
r66 r84 122 122 123 123 int streams_get_fh (int id) { 124 if ( id < 0 ) 125 return -1; 126 124 127 if ( g_streams[id] == NULL ) 125 128 return -1; … … 360 363 361 364 int streams_get_mixbuffers (void *** bufferlist, struct roar_audio_info * info, unsigned int pos) { 362 static void * bufs[ROAR_STREAMS_MAX ];365 static void * bufs[ROAR_STREAMS_MAX+1]; 363 366 int i; 364 367 int have = 0;
Note: See TracChangeset
for help on using the changeset viewer.