Skip to content

Commit

Permalink
Fix incompatible pointer types
Browse files Browse the repository at this point in the history
  • Loading branch information
sepfy committed Sep 23, 2024
1 parent 17bc7e0 commit 1c149d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ssl_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ void ssl_transport_disconnect(NetworkContext_t* net_ctx) {
tcp_socket_close(&net_ctx->tcp_socket);
}

int ssl_transport_recv(NetworkContext_t* net_ctx, void* buf, size_t len) {
int32_t ssl_transport_recv(NetworkContext_t* net_ctx, void* buf, size_t len) {
int ret;
memset(buf, 0, len);
ret = mbedtls_ssl_read(&net_ctx->ssl, buf, len);

return ret;
}

int ssl_transport_send(NetworkContext_t* net_ctx, const void* buf, size_t len) {
int32_t ssl_transport_send(NetworkContext_t* net_ctx, const void* buf, size_t len) {
int ret;

while ((ret = mbedtls_ssl_write(&net_ctx->ssl, buf, len)) <= 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/ssl_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ int ssl_transport_connect(NetworkContext_t* net_ctx,

void ssl_transport_disconnect(NetworkContext_t* net_ctx);

int ssl_transport_recv(NetworkContext_t* net_ctx, void* buf, size_t len);
int32_t ssl_transport_recv(NetworkContext_t* net_ctx, void* buf, size_t len);

int ssl_transport_send(NetworkContext_t* net_ctx, const void* buf, size_t len);
int32_t ssl_transport_send(NetworkContext_t* net_ctx, const void* buf, size_t len);

#endif // DISABLE_PEER_SIGNALING
#endif // SSL_TRANSPORT_H_

0 comments on commit 1c149d2

Please sign in to comment.