Commit 759e62f2 authored by Gábor Szalai's avatar Gábor Szalai
Browse files

The SO_REUSEADDR added back. (issue #1)



It was removed accidentally during update/refactor
Signed-off-by: Gábor Szalai's avatarGabor Szalai <gabor.szalai@ericsson.com>
parent 7f987525
......@@ -7,3 +7,7 @@
=== R12A
IPv6 support added
=== R12A
The SO_REUSEADDR added back. It was removed accidentally during update/refactor
......@@ -18,8 +18,6 @@
//
// File: SCTPasp_PT.cc
// Description: SCTPasp test port source
// Rev: <RnXnn>
// Prodnr: CNL 113 469
//
......@@ -1554,10 +1552,18 @@ int SCTPasp__PT_PROVIDER::fill_addr_struct(const char* name, int port, struct so
int SCTPasp__PT_PROVIDER::create_socket(int addr_family)
{
int local_fd;
int enable = 1;
log("Creating SCTP socket.");
if ((local_fd = socket(addr_family, SOCK_STREAM, IPPROTO_SCTP)) == -1)
error("Socket error: cannot create socket! %d %s %d %d",errno, strerror(errno),addr_family,AF_INET);
log("Setting SO_REUSEADDR options.");
if (setsockopt(local_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) < 0)
{
TTCN_warning("Setsockopt SO_REUSEADDR error! %d %s",errno, strerror(errno));
errno = 0;
}
log("Setting SCTP socket options (initmsg).");
if (setsockopt(local_fd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg,
sizeof(struct sctp_initmsg)) < 0)
......
......@@ -18,7 +18,6 @@
//
// File: SCTPasp_PT.hh
// Description: SCTPasp test port header
// Prodnr: CNL 113 469
//
......
......@@ -18,7 +18,6 @@
//
// File: SCTPasp_PortType.ttcn
// Description: SCTPasp testport definition file
// Prodnr: CNL 113 469
//
module SCTPasp_PortType
......
......@@ -18,7 +18,6 @@
//
// File: SCTPasp_Types.ttcn
// Description: SCTP ASP definition file
// Prodnr: CNL 113 469
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment