Skip to content

[4.4] libatalk: map logtype identifiers correctly with the enum#2903

Merged
andylemin merged 1 commit intobranch-netatalk-4-4from
rdmark-logtypes-4.4
Apr 19, 2026
Merged

[4.4] libatalk: map logtype identifiers correctly with the enum#2903
andylemin merged 1 commit intobranch-netatalk-4-4from
rdmark-logtypes-4.4

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Apr 19, 2026

ATalkDaemon and PAPDaemon were present in the enum but absent from the string identifier array, shifting every entry from UAMS onward by -2. As a result, f.e. "spotlight:debug" in afp.conf resolved to logtype_fce (index 8) rather than logtype_sl (index 10), so Spotlight debug logging could never be enabled via the config file.

Add the two missing entries to restore correct alignment, while correcting man page documentation; this has
probably been broken ever since we grafted AppleTalk onto v4.0.

ATalkDaemon and PAPDaemon were present in the enum but absent from the
string identifier array, shifting every entry from UAMS onward by -2.
As a result, f.e. "spotlight:debug" in afp.conf resolved to logtype_fce
(index 8) rather than logtype_sl (index 10), so Spotlight debug logging
could never be enabled via the config file.

Add the two missing entries to restore correct alignment,
while correcting man page documentation; this has
probably been broken ever since we grafted AppleTalk onto v4.0.
@rdmark rdmark requested a review from andylemin April 19, 2026 07:22
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 19, 2026

🤖 Augment PR Summary

Summary: Fixes logtype name resolution by restoring the missing ATalkDaemon/PAPDaemon entries in the logger logtype identifier array so it aligns with the enum logtypes.

Changes:

  • Updates libatalk/util/logger.c to include the missing logtype strings so afp.conf values map to the intended logtypes
  • Corrects the afp.conf(5) manpage logtype identifier documentation accordingly

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread doc/manpages/man5/afp.conf.5.md
Comment thread libatalk/util/logger.c
@sonarqubecloud
Copy link
Copy Markdown

@andylemin andylemin merged commit f6167c7 into branch-netatalk-4-4 Apr 19, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants