Changeset 5254:4b808f2c219c in roaraudio for libroar
- Timestamp:
- 11/13/11 17:46:42 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- libroar
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/vio_dstr.c
r5253 r5254 38 38 #ifndef ROAR_WITHOUT_VIO_DSTR 39 39 struct _roar_vio_dstr_type { 40 int id;41 c har * name;40 const int id; 41 const char * name; 42 42 int (* setdef) (struct roar_vio_dstr_chain * cur, struct roar_vio_dstr_chain * next); 43 43 int (* openvio)(struct roar_vio_calls * calls, struct roar_vio_calls * dst, struct roar_vio_dstr_chain * cur); … … 225 225 }; 226 226 227 int roar_vio_dstr_get_type(c har * str) {227 int roar_vio_dstr_get_type(const char * str) { 228 228 int i; 229 229 … … 247 247 } 248 248 249 c har * roar_vio_dstr_get_name(int type) {249 const char * roar_vio_dstr_get_name(const int type) { 250 250 struct _roar_vio_dstr_type * ret; 251 251 -
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.