[
https://issues.apache.org/jira/browse/QPID-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Stitcher resolved QPID-5489.
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.29
> C++ Uuid code needs cleaning up
> -------------------------------
>
> Key: QPID-5489
> URL: https://issues.apache.org/jira/browse/QPID-5489
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Broker, C++ Clustering
> Environment: FreeBSD
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Minor
> Fix For: 0.29
>
>
> The Uuid encapsulating code is a bit of a mess in qpid:
> There are 2 nearly parallel implementations with only minor differences -
> qpid::framing::Uuid and qpid::types::Uuid. The reason for this historical
> with types::Uuids being written to supplant framing::Uuid to avoid its
> pernicious dependencies.
> However at this point the framing version is not widely used and can be
> mostly removed in favour of the types version.
> Added to this is an issue in the FreeBSD port: This has a uuid_compare()
> function actually implemented in libc - in addition to the one in libuuid.
> The two are incompatible. However the version in libc seems to be used
> preferentially even if libuuid is linked in - I'm not sure why.
> So it would be a good idea to just avoid uuid_compare completely. Fortunately
> we can in fact do this - we hold uuids in memory in the same order that they
> appear on the wire (for easy receiving and sending) in this case the
> uuid_compare is actually exactly the same as doing a memcmp() over the raw
> bytes.
> It turns out that once you have done this the only library calls that we are
> left meeding are uuid_generate(), uuid_parse() & uuid_unparse(). And _parse
> and _unparse would be very simple to replace because they just read/write the
> bytes in the order that we keep them in memory and add/remove '-' characters
> in the correct place.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]