]>
Commit | Line | Data |
---|---|---|
1 | # HG changeset patch | |
2 | # Parent ce2db2c6f39af5bf1c41720dcf96cd93c55c9658 | |
3 | ||
4 | diff -r ce2db2c6f39a doc/api/log.txt | |
5 | --- a/doc/api/log.txt Fri Jul 19 21:34:34 2013 +0100 | |
6 | +++ b/doc/api/log.txt Fri Jul 19 21:37:28 2013 +0100 | |
7 | @@ -221,7 +221,7 @@ | |
8 | </function> | |
9 | ||
10 | <function> | |
11 | -void log_feature_report(struct Client *to, int flag); | |
12 | +void log_feature_report(struct Client *to, int flag, int showall); | |
13 | ||
14 | This function is called by the ircd_features.c subsystem and should | |
15 | not be called by any other part of ircd. See the features API | |
16 | diff -r ce2db2c6f39a include/ircd_log.h | |
17 | --- a/include/ircd_log.h Fri Jul 19 21:34:34 2013 +0100 | |
18 | +++ b/include/ircd_log.h Fri Jul 19 21:37:28 2013 +0100 | |
19 | @@ -110,7 +110,7 @@ | |
20 | ||
21 | extern void log_feature_unmark(void); | |
22 | extern int log_feature_mark(int flag); | |
23 | -extern void log_feature_report(struct Client *to, int flag); | |
24 | +extern void log_feature_report(struct Client *to, int flag, int showall); | |
25 | ||
26 | extern int log_inassert; | |
27 | ||
28 | diff -r ce2db2c6f39a ircd/ircd_features.c | |
29 | --- a/ircd/ircd_features.c Fri Jul 19 21:34:34 2013 +0100 | |
30 | +++ b/ircd/ircd_features.c Fri Jul 19 21:37:28 2013 +0100 | |
31 | @@ -244,7 +244,7 @@ | |
32 | * @param[in] sptr Client asking for feature list. | |
33 | * @param[in] marked Non-zero if the feature is marked. | |
34 | */ | |
35 | -typedef void (*feat_report_call)(struct Client* sptr, int marked); | |
36 | +typedef void (*feat_report_call)(struct Client* sptr, int marked, int showall); | |
37 | ||
38 | #define FEAT_NONE 0x0000 /**< no value */ | |
39 | #define FEAT_INT 0x0001 /**< set if entry contains an integer value */ | |
40 | @@ -851,7 +851,7 @@ | |
41 | switch (features[i].flags & FEAT_MASK) { | |
42 | case FEAT_NONE: | |
43 | if (features[i].report) /* let the callback handle this */ | |
44 | - (*features[i].report)(to, report); | |
45 | + (*features[i].report)(to, report, sd->sd_funcdata); | |
46 | break; | |
47 | ||
48 | ||
49 | diff -r ce2db2c6f39a ircd/ircd_log.c | |
50 | --- a/ircd/ircd_log.c Fri Jul 19 21:34:34 2013 +0100 | |
51 | +++ b/ircd/ircd_log.c Fri Jul 19 21:37:28 2013 +0100 | |
52 | @@ -959,29 +959,34 @@ | |
53 | /** Feature list callback to report log settings. | |
54 | * @param[in] to Client requesting list. | |
55 | * @param[in] flag If non-zero, report default syslog facility. | |
56 | + * @param[in] showall If non-zero, report all (ignored). | |
57 | */ | |
58 | void | |
59 | -log_feature_report(struct Client *to, int flag) | |
60 | +log_feature_report(struct Client *to, int flag, int showall) | |
61 | { | |
62 | int i; | |
63 | ||
64 | for (i = 0; i < LS_LAST_SYSTEM; i++) | |
65 | { | |
66 | - if (logDesc[i].mark & LOG_MARK_FILE) /* report file */ | |
67 | - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F LOG %s FILE %s", | |
68 | + if ((logDesc[i].mark & LOG_MARK_FILE) || (showall)) /* report file */ | |
69 | + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "%c LOG %s FILE %s", | |
70 | + (logDesc[i].mark & LOG_MARK_FILE) ? 'F' : 'f', | |
71 | logDesc[i].name, (logDesc[i].file && logDesc[i].file->file ? | |
72 | logDesc[i].file->file : "(terminal)")); | |
73 | ||
74 | - if (logDesc[i].mark & LOG_MARK_FACILITY) /* report facility */ | |
75 | - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F LOG %s FACILITY %s", | |
76 | + if ((logDesc[i].mark & LOG_MARK_FACILITY) || (showall)) /* report facility */ | |
77 | + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "%c LOG %s FACILITY %s", | |
78 | + (logDesc[i].mark & LOG_MARK_FACILITY) ? 'F' : 'f', | |
79 | logDesc[i].name, log_fac_name(logDesc[i].facility)); | |
80 | ||
81 | - if (logDesc[i].mark & LOG_MARK_SNOMASK) /* report snomask */ | |
82 | - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F LOG %s SNOMASK %s", | |
83 | + if ((logDesc[i].mark & LOG_MARK_SNOMASK) || (showall))/* report snomask */ | |
84 | + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "%c LOG %s SNOMASK %s", | |
85 | + (logDesc[i].mark & LOG_MARK_FACILITY) ? 'F' : 'f', | |
86 | logDesc[i].name, log_sno_name(logDesc[i].snomask)); | |
87 | ||
88 | - if (logDesc[i].mark & LOG_MARK_LEVEL) /* report log level */ | |
89 | - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F LOG %s LEVEL %s", | |
90 | + if ((logDesc[i].mark & LOG_MARK_LEVEL) || (showall)) /* report log level */ | |
91 | + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "%c LOG %s LEVEL %s", | |
92 | + (logDesc[i].mark & LOG_MARK_FACILITY) ? 'F' : 'f', | |
93 | logDesc[i].name, log_lev_name(logDesc[i].level)); | |
94 | } | |
95 |