diff options
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/interface.c b/interface.c index a014111..522e7fe 100644 --- a/interface.c +++ b/interface.c @@ -94,11 +94,11 @@ interface_error_flush(struct interface *iface) static void interface_clear_errors(struct interface *iface) { - /* don't flush the errors in case the configured protocol handler matches the + /* don't flush the errors in case the configured protocol handler matches the running protocol handler and is having the last error capability */ if (!(iface->proto && - (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) && - (iface->proto->handler->name == iface->proto_handler->name))) + (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) && + (iface->proto->handler->name == iface->proto_handler->name))) interface_error_flush(iface); } @@ -110,12 +110,12 @@ void interface_add_error(struct interface *iface, const char *subsystem, int *datalen = NULL; char *dest, *d_subsys, *d_code; - /* if the configured protocol handler has the last error support capability, + /* if the configured protocol handler has the last error support capability, errors should only be added if the running protocol handler matches the configured one */ if (iface->proto && - (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) && - (iface->proto->handler->name != iface->proto_handler->name)) + (iface->proto->handler->flags & PROTO_FLAG_LASTERROR) && + (iface->proto->handler->name != iface->proto_handler->name)) return; if (n_data) { |