#endif
- /*Add notes*/
- // The al->notes and request->notes must point to the same object.
- (void)SyncNotes(*al, *request);
- typedef Notes::iterator ACAMLI;
- for (ACAMLI i = Config.notes.begin(); i != Config.notes.end(); ++i) {
- if (const char *value = (*i)->match(request, al->reply, NULL)) {
- NotePairs ¬es = SyncNotes(*al, *request);
- notes.add((*i)->key.termedBuf(), value);
- debugs(33, 3, HERE << (*i)->key.termedBuf() << " " << value);
+ /* Add notes (if we have a request to annotate) */
+ if (request) {
+ // The al->notes and request->notes must point to the same object.
+ (void)SyncNotes(*al, *request);
+ for (auto i = Config.notes.begin(); i != Config.notes.end(); ++i) {
+ if (const char *value = (*i)->match(request, al->reply, NULL)) {
+ NotePairs ¬es = SyncNotes(*al, *request);
+ notes.add((*i)->key.termedBuf(), value);
+ debugs(33, 3, (*i)->key.termedBuf() << " " << value);
+ }
}
}