Skip to content

Commit

Permalink
Rename close function to not clash with linux network close
Browse files Browse the repository at this point in the history
  • Loading branch information
markjfisher committed Jan 23, 2024
1 parent 9438035 commit 0c777cc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/bus/iwm/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Connection
virtual void send_data(const std::vector<uint8_t> &data) = 0;

virtual void create_read_channel() = 0;
virtual void close() = 0;
virtual void close_connection() = 0;

bool is_connected() const { return is_connected_; }
void set_is_connected(const bool is_connected) { is_connected_ = is_connected; }
Expand Down
2 changes: 1 addition & 1 deletion lib/bus/iwm/TCPConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// #include "Log.h"
#include "SLIP.h"

void TCPConnection::close()
void TCPConnection::close_connection()
{
if (socket_ != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/bus/iwm/TCPConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TCPConnection : public Connection, public std::enable_shared_from_this<TCP

virtual void send_data(const std::vector<uint8_t>& data) override;
virtual void create_read_channel() override;
virtual void close() override;
virtual void close_connection() override;

int get_socket() const { return socket_; }
void set_socket(int socket) { this->socket_ = socket; }
Expand Down
7 changes: 1 addition & 6 deletions lib/bus/iwm/iwm_slip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@
#else
#include <arpa/inet.h>
#include <errno.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define CLOSE_SOCKET close
#define SHUTDOWN_SOCKET(s) shutdown(s, SHUT_WR)
Expand Down

0 comments on commit 0c777cc

Please sign in to comment.