Skip to content

Commit

Permalink
Merge pull request ros-industrial#109 from ros-industrial/indigo-devel
Browse files Browse the repository at this point in the history
Pulling in devel changes into release branch
  • Loading branch information
shaun-edwards committed Mar 17, 2015
2 parents a50a53d + a13d393 commit 8741ee9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 6 additions & 1 deletion simple_message/include/simple_message/socket/simple_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ class SimpleSocket : public industrial::smpl_msg_connection::SmplMsgConnection
/**
* \brief Constructor
*/
SimpleSocket(){}
SimpleSocket()
{
this->setSockHandle(this->SOCKET_FAIL);
memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
this->setConnected(false);
}

/**
* \brief Destructor
Expand Down
6 changes: 0 additions & 6 deletions simple_message/src/socket/tcp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,10 @@ namespace tcp_socket
{

TcpSocket::TcpSocket()
// Constructor for UDP socket object
{
this->setSockHandle(this->SOCKET_FAIL);
memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
this->setConnected(false);

}

TcpSocket::~TcpSocket()
// Destructor for UDP socket object
// Closes socket
{
LOG_DEBUG("Destructing TCPSocket");
Expand Down
3 changes: 0 additions & 3 deletions simple_message/src/socket/udp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ namespace udp_socket
UdpSocket::UdpSocket()
// Constructor for UDP socket object
{
this->setSockHandle(this->SOCKET_FAIL);
memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));
memset(&this->udp_read_buffer_, 0, sizeof(this->udp_read_buffer_));
udp_read_head_ = this->udp_read_buffer_;
udp_read_len_ = 0;

}

UdpSocket::~UdpSocket()
Expand Down

0 comments on commit 8741ee9

Please sign in to comment.