File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ class IPLocator
102102 const Locator_t& locator,
103103 unsigned char * dest);
104104
105+ // ! Copies locator's IPv4.
106+ FASTDDS_EXPORTED_API static bool copyIPv4 (
107+ const Locator_t& locator,
108+ Locator_t& dest);
109+
105110 // IPv6
106111 // ! Sets locator's IPv6.
107112 FASTDDS_EXPORTED_API static bool setIPv6 (
Original file line number Diff line number Diff line change @@ -202,6 +202,14 @@ bool IPLocator::copyIPv4(
202202 return true ;
203203}
204204
205+ bool IPLocator::copyIPv4 (
206+ const Locator_t& locator,
207+ Locator_t& dest)
208+ {
209+ copyIPv4 (locator, &(dest.address [12 ]));
210+ return true ;
211+ }
212+
205213// IPv6
206214bool IPLocator::setIPv6 (
207215 Locator_t& locator,
@@ -996,7 +1004,7 @@ bool IPLocator::copy_address(
9961004
9971005 if (loc1.kind == LOCATOR_KIND_UDPv4 || loc1.kind == LOCATOR_KIND_TCPv4)
9981006 {
999- copyIPv4 (loc1, loc2. address );
1007+ copyIPv4 (loc1, loc2);
10001008 return true ;
10011009 }
10021010 else if (loc1.kind == LOCATOR_KIND_UDPv6 || loc1.kind == LOCATOR_KIND_TCPv6)
You can’t perform that action at this time.
0 commit comments