Skip to content

id generation code cleanups

Alan Coopersmith requested to merge alanc/libsm:getaddrinfo into master

sm_genid.c supports three methods of generating client ids - two based on UUIDs, and if those are not available, one based on IP addresses, with optional IPv6 support. If none of those three are available, a final fallback of "return NULL" is provided. This cleans up the configure & ifdef code for choosing which to use.

  • Skip network checks/headers/libraries if using UUID-based ids
  • sm_genid.c: simplify final fallback case
  • Simplify ifdefs for IPv6 support
  • if getaddrinfo() is available, use it, even if IPv6 support is disabled
  • SmsGenerateClientID: simplify code to convert IPv4 address to hex string
Edited by Alan Coopersmith

Merge request reports

Loading