Changeset 4830:fb6bb2abfcc5 in roaraudio
- Timestamp:
- 04/03/11 10:50:04 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_proto.c
r4828 r4830 291 291 } 292 292 293 static int _parse_header(struct roar_keyval * kv, char ** buf, int * aligned ) {293 static int _parse_header(struct roar_keyval * kv, char ** buf, int * aligned, char * endofheader) { 294 294 char * p = *buf; 295 295 char c = 0; … … 302 302 } 303 303 304 if ( p >= endofheader ) 305 return -1; 306 304 307 kv->key = p; 305 308 … … 307 310 308 311 if ( *p == 0 ) 312 return -1; 313 314 if ( p >= endofheader ) 309 315 return -1; 310 316 … … 337 343 338 344 if ( *p == 0 ) 345 return -1; 346 347 if ( p >= endofheader ) 339 348 return -1; 340 349 … … 425 434 } 426 435 436 ROAR_DBG("roar_vio_open_proto_http(*): got %i bytes from server.", len); 437 427 438 buf[len] = 0; 428 439 … … 434 445 return -1; 435 446 } 447 448 ROAR_DBG("roar_vio_open_proto_http(*): b0='%s'", b0); 436 449 437 450 ROAR_DBG("roar_vio_open_proto_http(*) = ?"); … … 455 468 456 469 p = buf; 457 while ( _parse_header(&kv, &p, &aligned ) > 0 )470 while ( _parse_header(&kv, &p, &aligned, endofheader) > 0 ) 458 471 if ( aligned ) 459 472 _handle_header(self, &kv); … … 471 484 472 485 /* Doesn't work good. 473 while ( _parse_header(&kv, &p, &aligned ) > 0 )486 while ( _parse_header(&kv, &p, &aligned, endofheader) > 0 ) 474 487 if ( aligned ) 475 488 _handle_header(self, &kv); 476 489 */ 477 490 491 p = buf; 492 while ( _parse_header(&kv, &p, &aligned, endofheader) > 0 ) 493 if ( aligned ) 494 _handle_header(self, &kv); 495 478 496 ROAR_DBG("roar_vio_open_proto_http(*): endofheader=%p\n", endofheader); 479 497 }
Note: See TracChangeset
for help on using the changeset viewer.