net__write buf should be const.

pull/1992/head
Roger Light 5 years ago
parent 8385769b86
commit c604cf8fd0

@ -48,7 +48,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
return 0; return 0;
} }
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count) ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count)
{ {
return 0; return 0;
} }

@ -995,7 +995,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
#endif #endif
} }
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count) ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count)
{ {
#ifdef WITH_TLS #ifdef WITH_TLS
int ret; int ret;

@ -69,7 +69,7 @@ int net__socket_nonblock(mosq_sock_t *sock);
int net__socketpair(mosq_sock_t *sp1, mosq_sock_t *sp2); int net__socketpair(mosq_sock_t *sp1, mosq_sock_t *sp2);
ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count); ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count);
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count); ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count);
#ifdef WITH_TLS #ifdef WITH_TLS
void net__print_ssl_error(struct mosquitto *mosq); void net__print_ssl_error(struct mosquitto *mosq);

Loading…
Cancel
Save