mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
clean: use lws_intptr_t where needed
This commit is contained in:
parent
685d9cb690
commit
d2b3bed3c9
9 changed files with 12 additions and 12 deletions
|
@ -327,7 +327,7 @@ set(PACKAGE "libwebsockets")
|
|||
set(CPACK_PACKAGE_NAME "${PACKAGE}")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "4")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "13")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "14")
|
||||
set(CPACK_PACKAGE_RELEASE 1)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
|
|
@ -487,7 +487,7 @@ just_kill_connection:
|
|||
#endif
|
||||
{
|
||||
lwsl_info("%s: shutdown conn: %p (sk %d, state 0x%x)\n",
|
||||
__func__, wsi, (int)(long)wsi->desc.sockfd,
|
||||
__func__, wsi, (int)(lws_intptr_t)wsi->desc.sockfd,
|
||||
lwsi_state(wsi));
|
||||
if (!wsi->socket_is_permanently_unusable &&
|
||||
lws_socket_is_valid(wsi->desc.sockfd)) {
|
||||
|
|
|
@ -816,7 +816,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
|
||||
#if LWS_MAX_SMP > 1
|
||||
case LWS_CALLBACK_GET_THREAD_ID:
|
||||
return (int)(unsigned long long)pthread_self();
|
||||
return (int)(lws_intptr_t)pthread_self();
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
|
|
@ -366,7 +366,7 @@ lws_ssl_capable_write_no_ssl(struct lws *wsi, unsigned char *buf, int len)
|
|||
} else
|
||||
#endif
|
||||
if (wsi->role_ops->file_handle)
|
||||
n = write((int)(long long)wsi->desc.filefd, buf, len);
|
||||
n = write((int)(lws_intptr_t)wsi->desc.filefd, buf, len);
|
||||
else
|
||||
n = send(wsi->desc.sockfd, (char *)buf, len, MSG_NOSIGNAL);
|
||||
// lwsl_info("%s: sent len %d result %d", __func__, len, n);
|
||||
|
|
|
@ -622,7 +622,7 @@ elops_accept_uv(struct lws *wsi)
|
|||
|
||||
if (wsi->role_ops->file_handle)
|
||||
uv_poll_init(pt->uv.io_loop, wsi->w_read.uv.pwatcher,
|
||||
(int)(long long)wsi->desc.filefd);
|
||||
(int)(lws_intptr_t)wsi->desc.filefd);
|
||||
else
|
||||
uv_poll_init_socket(pt->uv.io_loop,
|
||||
wsi->w_read.uv.pwatcher,
|
||||
|
|
|
@ -259,7 +259,7 @@ lws_ssl_client_bio_create(struct lws *wsi)
|
|||
#endif
|
||||
#endif /* USE_WOLFSSL */
|
||||
|
||||
wsi->tls.client_bio = BIO_new_socket((int)(long long)wsi->desc.sockfd,
|
||||
wsi->tls.client_bio = BIO_new_socket((int)(lws_intptr_t)wsi->desc.sockfd,
|
||||
BIO_NOCLOSE);
|
||||
SSL_set_bio(wsi->tls.ssl, wsi->tls.client_bio, wsi->tls.client_bio);
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd)
|
|||
}
|
||||
|
||||
SSL_set_ex_data(wsi->tls.ssl, openssl_websocket_private_data_index, wsi);
|
||||
SSL_set_fd(wsi->tls.ssl, (int)(long long)accept_fd);
|
||||
SSL_set_fd(wsi->tls.ssl, (int)(lws_intptr_t)accept_fd);
|
||||
|
||||
#ifdef USE_WOLFSSL
|
||||
#ifdef USE_OLD_CYASSL
|
||||
|
|
|
@ -306,7 +306,7 @@ file_upload_cb(void *data, const char *name, const char *filename,
|
|||
if (pss->file_length > pss->vhd->max_size) {
|
||||
pss->response_code =
|
||||
HTTP_STATUS_REQ_ENTITY_TOO_LARGE;
|
||||
close((int)(long long)pss->fd);
|
||||
close((int)(lws_intptr_t)pss->fd);
|
||||
pss->fd = LWS_INVALID_FILE;
|
||||
unlink(pss->filename);
|
||||
|
||||
|
@ -314,7 +314,7 @@ file_upload_cb(void *data, const char *name, const char *filename,
|
|||
}
|
||||
|
||||
if (pss->fd != LWS_INVALID_FILE) {
|
||||
n = write((int)(long long)pss->fd, buf, len);
|
||||
n = write((int)(lws_intptr_t)pss->fd, buf, len);
|
||||
lwsl_debug("%s: write %d says %d\n", __func__,
|
||||
len, n);
|
||||
lws_set_timeout(pss->wsi, PENDING_TIMEOUT_HTTP_CONTENT, 30);
|
||||
|
@ -324,7 +324,7 @@ file_upload_cb(void *data, const char *name, const char *filename,
|
|||
break;
|
||||
|
||||
if (pss->fd != LWS_INVALID_FILE)
|
||||
close((int)(long long)pss->fd);
|
||||
close((int)(lws_intptr_t)pss->fd);
|
||||
|
||||
/* the temp filename without the ~ */
|
||||
lws_strncpy(filename2, pss->filename, sizeof(filename2));
|
||||
|
|
|
@ -94,7 +94,7 @@ file_upload_cb(void *data, const char *name, const char *filename,
|
|||
return 1;
|
||||
|
||||
#if !defined(LWS_WITH_ESP32)
|
||||
n = write((int)(long long)pss->fd, buf, len);
|
||||
n = write((int)(lws_intptr_t)pss->fd, buf, len);
|
||||
lwsl_info("%s: write %d says %d\n", __func__, len, n);
|
||||
#else
|
||||
lwsl_notice("%s: Received chunk size %d\n", __func__, len);
|
||||
|
@ -103,7 +103,7 @@ file_upload_cb(void *data, const char *name, const char *filename,
|
|||
if (state == LWS_UFS_CONTENT)
|
||||
break;
|
||||
#if !defined(LWS_WITH_ESP32)
|
||||
close((int)(long long)pss->fd);
|
||||
close((int)(lws_intptr_t)pss->fd);
|
||||
pss->fd = LWS_INVALID_FILE;
|
||||
#endif
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue