Commit c6abc2c1 authored by Steve Langasek's avatar Steve Langasek
Browse files

Ensure callbacks are called directly when running with --no-events,

otherwise the "event" handling of the non-events never finishes and
mountall hangs.  LP: #1099349.
parent 1fc3e141
mountall (2.47) UNRELEASED; urgency=low
[ Dave Chiluk ]
* Adjust parsing of options so mountall doesn't strip options that are
substrings of these strings (showthrough, optional, bootwait, nobootwait
or timeout). This fixes the issue where timeo was getting stripped from
nfs mounts. LP: #1041377.
[ Steve Langasek ]
* Ensure callbacks are called directly when running with --no-events,
otherwise the "event" handling of the non-events never finishes and
mountall hangs. LP: #1099349.
-- Dave Chiluk <dave.chiluk@canonical.com> Wed, 19 Dec 2012 10:58:21 -0600
mountall (2.46) unstable; urgency=low
......
......@@ -2700,8 +2700,17 @@ emit_event (const char *name,
nih_assert (name != NULL);
if (no_events)
if (mnt && cb) {
reply_data = NIH_MUST (nih_alloc (NULL, sizeof (EventReplyData)));
reply_data->mnt = mnt;
reply_data->handler = cb;
}
if (no_events) {
if (cb)
cb (reply_data, NULL);
return;
}
/* Flush the Plymouth connection to ensure all updates are sent,
* since the event may kill plymouth.
......@@ -2735,9 +2744,6 @@ emit_event (const char *name,
nih_discard (var);
}
if (mnt && cb)
reply_data = NIH_MUST (nih_alloc (NULL, sizeof (EventReplyData)));
pending_call = NIH_SHOULD (upstart_emit_event (upstart,
name, env, reply_data ? TRUE : FALSE,
reply_data ? cb : NULL,
......@@ -2748,9 +2754,6 @@ emit_event (const char *name,
if (reply_data) {
reply_data->mnt = mnt;
reply_data->handler = cb;
/* If previous event is still pending, wait for it. */
if (mnt->pending_call) {
DBusPendingCall *pending = mnt->pending_call;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment