summaryrefslogtreecommitdiff
path: root/callouts
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-01-12 16:08:46 +0100
committerThomas Haller <thaller@redhat.com>2016-01-12 16:24:38 +0100
commit466a081c0fcf4039665c7ee139bd52ac64099a9d (patch)
treed0d69e795c0daeb4c3c89c16de6cc8151cbc9a76 /callouts
parent2b54bd6a53b165f12b8eefe5232ea20cc9d3440c (diff)
downloadNetworkManager-466a081c0fcf4039665c7ee139bd52ac64099a9d.tar.gz
dispatcher: add assertion and code comment to complete_script()
Diffstat (limited to 'callouts')
-rw-r--r--callouts/nm-dispatcher.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c
index 43d34eb7e7..c3ad499e38 100644
--- a/callouts/nm-dispatcher.c
+++ b/callouts/nm-dispatcher.c
@@ -359,6 +359,17 @@ complete_script (ScriptInfo *script)
complete_request (handler->current_request);
} else
return;
+ } else {
+ /* if the script is a "wait" script, we already tried above to
+ * dispatch the next script. As we didn't do that, it means we
+ * just completed the last script of @request and we can continue
+ * with the next request...
+ *
+ * Also, it cannot be that there is another request currently being
+ * processed because only requests with "wait" scripts can become
+ * @current_request. As there can only be one "wait" script running
+ * at any time, it means complete_request() above completed @request. */
+ nm_assert (!handler->current_request);
}
while (next_request (handler, NULL)) {