summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-27 12:39:52 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-27 12:39:52 +0000
commit1f8f2ebe3bb385593755b69bd264ff5f831a22ae (patch)
treeac1e4774710eeda2bf1d913f76cef57de8d001f8
parentad522c14994ae19c5a6507ee10ebcacdbf3cf107 (diff)
parent6d6a4a488d7b631f519b1cf462ffbb44d399e1ce (diff)
downloadouroboros-1f8f2ebe3bb385593755b69bd264ff5f831a22ae.tar.gz
ouroboros-1f8f2ebe3bb385593755b69bd264ff5f831a22ae.zip
Merged in dstaesse/ouroboros/be-dt (pull request #494)
ipcpd: Fix start/stop order in dt
-rw-r--r--src/ipcpd/normal/dt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c
index 6ac73a93..8b10c84c 100644
--- a/src/ipcpd/normal/dt.c
+++ b/src/ipcpd/normal/dt.c
@@ -230,16 +230,16 @@ int dt_start(void)
return -1;
}
- dt.gam = gam_create(pg, dt.nbs, dt.ae);
- if (dt.gam == NULL) {
- log_err("Failed to init dt graph adjacency manager.");
- return -1;
- }
-
dt.sdu_sched = sdu_sched_create(sdu_handler);
if (dt.sdu_sched == NULL) {
log_err("Failed to create N-1 SDU scheduler.");
- gam_destroy(dt.gam);
+ return -1;
+ }
+
+ dt.gam = gam_create(pg, dt.nbs, dt.ae);
+ if (dt.gam == NULL) {
+ log_err("Failed to init dt graph adjacency manager.");
+ sdu_sched_destroy(dt.sdu_sched);
return -1;
}
@@ -248,9 +248,9 @@ int dt_start(void)
void dt_stop(void)
{
- sdu_sched_destroy(dt.sdu_sched);
-
gam_destroy(dt.gam);
+
+ sdu_sched_destroy(dt.sdu_sched);
}
int dt_write_sdu(struct pci * pci,