We are not supposed to modify it and ustream accepts const already.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
void (*disconnect)(struct uclient *cl);
int (*read)(struct uclient *cl, char *buf, unsigned int len);
- int (*write)(struct uclient *cl, char *buf, unsigned int len);
+ int (*write)(struct uclient *cl, const char *buf, unsigned int len);
};
void uclient_backend_set_error(struct uclient *cl, int code);
}
static int
-uclient_http_send_data(struct uclient *cl, char *buf, unsigned int len)
+uclient_http_send_data(struct uclient *cl, const char *buf, unsigned int len)
{
struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
free(url);
}
-int uclient_write(struct uclient *cl, char *buf, int len)
+int uclient_write(struct uclient *cl, const char *buf, int len)
{
if (!cl->backend->write)
return -1;
void uclient_disconnect(struct uclient *cl);
int uclient_read(struct uclient *cl, char *buf, int len);
-int uclient_write(struct uclient *cl, char *buf, int len);
+int uclient_write(struct uclient *cl, const char *buf, int len);
int uclient_request(struct uclient *cl);
char *uclient_get_addr(char *dest, int *port, union uclient_addr *a);