Changeset 5254:4b808f2c219c in roaraudio for libroar/vio_proto.c
- Timestamp:
- 11/13/11 17:46:42 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_proto.c
r5028 r5254 94 94 95 95 int roar_vio_open_proto (struct roar_vio_calls * calls, struct roar_vio_calls * dst, 96 c har * dstr, int proto, struct roar_vio_defaults * odef) {96 const char * dstr, int proto, struct roar_vio_defaults * odef) { 97 97 #ifndef ROAR_WITHOUT_VIO_PROTO 98 98 struct roar_userpass userpass = {.subtype = -1, .user = NULL, .pass = NULL}; 99 99 struct roar_vio_proto * self; 100 c har * host;100 const char * host; 101 101 char * tmp; 102 102 … … 157 157 158 158 if ( (tmp = strstr(host, "@")) != NULL ) { 159 userpass.user = host;159 userpass.user = (char*)host; 160 160 *tmp = 0; 161 161 host = tmp + 1; … … 481 481 } 482 482 483 int roar_vio_open_proto_http (struct roar_vio_calls * calls, struct roar_vio_calls * dst, c har * host,char * file, struct roar_userpass * up) {483 int roar_vio_open_proto_http (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file, struct roar_userpass * up) { 484 484 struct roar_keyval kv; 485 485 struct roar_vio_proto * self; … … 607 607 608 608 if ( bufbuf != NULL ) { 609 roar_buffer_set_offset(bufbuf, endofheader - buf + oeflen); 610 roar_buffer_set_len(bufbuf, len - (endofheader - buf + oeflen) - 0 /* ??? */); 609 if ( roar_buffer_set_offset(bufbuf, endofheader - buf + oeflen) == -1 || 610 roar_buffer_set_len(bufbuf, len - (endofheader - buf + oeflen) - 0 /* ??? */) == -1 ) { 611 // TODO: FIXME: handle this in a better way. 612 ROAR_ERR("roar_vio_open_proto_http(*): Can not set data area of buffer %p, VERY BAD.", bufbuf); 613 } 611 614 } 612 615 self->reader.buffer = bufbuf; … … 625 628 } 626 629 627 int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, c har * host,char * file) {630 int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file) { 628 631 struct roar_vio_proto * self; 629 632 char type;
Note: See TracChangeset
for help on using the changeset viewer.