Patch for [CONPRO-1509] https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/588 has a bug
due to which the following error comes in Tizen Platform.
"01-01 11:43:56.060+0900 E/OIC_CA_TCP_SERVER_1023(P 2022, T 2031): catcpserver.c:
CATCPCreateSocket(1029) > bind socket failed: Address family not supported by protocol"
Reason: Address family is not set.
This patch fixes the issue.
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/
992729fd6eab4f1b57280f6502ce09d460ace39c
(cherry-picked from
992729fd6eab4f1b57280f6502ce09d460ace39c)
Change-Id: I98edd8c18ec8183bd2208d587599bf9ae294db12
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
{
struct sockaddr_in client;
memset(&client, 0x00, sizeof(client));
+ client.sin_family = AF_INET;
inet_pton(AF_INET, host_address, &(client.sin_addr.s_addr));
if (-1 == bind(fd, (struct sockaddr *)&client, socklen))
{