diff options
Diffstat (limited to 'src/mm-port-serial-at.c')
-rw-r--r-- | src/mm-port-serial-at.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-port-serial-at.c b/src/mm-port-serial-at.c index 8e2aa2aa..fb2174da 100644 --- a/src/mm-port-serial-at.c +++ b/src/mm-port-serial-at.c @@ -207,9 +207,12 @@ mm_port_serial_at_add_unsolicited_msg_handler (MMPortSerialAt *self, if (handler->notify) handler->notify (handler->user_data); } else { + /* The new handler is always PREPENDED, so that e.g. plugins can provide + * more specific matches for URCs that are also handled by the generic + * plugin. */ handler = g_slice_new (MMAtUnsolicitedMsgHandler); - self->priv->unsolicited_msg_handlers = g_slist_append (self->priv->unsolicited_msg_handlers, handler); handler->regex = g_regex_ref (regex); + self->priv->unsolicited_msg_handlers = g_slist_prepend (self->priv->unsolicited_msg_handlers, handler); } handler->callback = callback; |