Opened 4 years ago

Closed 3 years ago

#12245 closed bug (duplicate)

BNetworkAddress IsEmpty true when SetTo is run with IPv6 address

Reported by: kallisti5 Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Kits/Network Kit Version: R1/Development
Keywords: ipv6 bunittest bnetlib Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

BNetworkAddress address;
ASSERT_TRUE(address.IsEmpty());
address.SetTo("::1");
ASSERT_FALSE(address.IsEmpty());  // Test unit fail

Change History (4)

comment:1 Changed 4 years ago by kallisti5

I should mention that this also fails:

BNetworkAddress address;
ASSERT_TRUE(address.IsEmpty());
address.SetTo(AF_INET6, "::1");
ASSERT_FALSE(address.IsEmpty());  // FAIL

comment:2 Changed 4 years ago by pulkomandy

SetTo returns an error code, what is it? (if you are writing unit tests, they should check that it is B_OK and print the value if it is not, so we know what to look for in the code).

comment:3 Changed 3 years ago by kallisti5

dupe of #12247 The initial SetTo fails.

comment:4 Changed 3 years ago by kallisti5

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.