Skip to content

Commit

Permalink
Remove get_id function
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Jul 9, 2023
1 parent b882bc5 commit b5eeba7
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions lwesp/src/lwesp/lwesp_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,6 @@ lwespi_conn_check_available_rx_data(void) {

#endif /* LWESP_CFG_CONN_MANUAL_TCP_RECEIVE || __DOXYGEN__ */

/**
* \brief Get connection validation ID
* \param[in] conn: Connection handle
* \return Connection current validation ID
*/
uint16_t
lwespi_conn_get_val_id(lwesp_conn_p conn) {
uint16_t val_id;
lwesp_core_lock();
val_id = conn->val_id;
lwesp_core_unlock();

return val_id;
}

/**
* \brief Send data on already active connection of type UDP to specific remote IP and port
* \note In case IP and port values are not set, it will behave as normal send function (suitable for TCP too)
Expand Down Expand Up @@ -235,7 +220,7 @@ prv_conn_send(lwesp_conn_p conn, const lwesp_ip_t* const ip, lwesp_port_t port,
LWESP_MSG_VAR_REF(msg).msg.conn_send.remote_ip = ip;
LWESP_MSG_VAR_REF(msg).msg.conn_send.remote_port = port;
LWESP_MSG_VAR_REF(msg).msg.conn_send.fau = fau;
LWESP_MSG_VAR_REF(msg).msg.conn_send.val_id = lwespi_conn_get_val_id(conn);
LWESP_MSG_VAR_REF(msg).msg.conn_send.val_id = conn->val_id;

return lwespi_send_msg_to_producer_mbox(&LWESP_MSG_VAR_REF(msg), lwespi_initiate_cmd, 60000);
}
Expand Down Expand Up @@ -377,7 +362,7 @@ lwesp_conn_close(lwesp_conn_p conn, const uint32_t blocking) {
LWESP_MSG_VAR_ALLOC(msg, blocking);
LWESP_MSG_VAR_REF(msg).cmd_def = LWESP_CMD_TCPIP_CIPCLOSE;
LWESP_MSG_VAR_REF(msg).msg.conn_close.conn = conn;
LWESP_MSG_VAR_REF(msg).msg.conn_close.val_id = lwespi_conn_get_val_id(conn);
LWESP_MSG_VAR_REF(msg).msg.conn_close.val_id = conn->val_id;

flush_buff(conn); /* First flush buffer */
res = lwespi_send_msg_to_producer_mbox(&LWESP_MSG_VAR_REF(msg), lwespi_initiate_cmd, 1000);
Expand Down

0 comments on commit b5eeba7

Please sign in to comment.