Commit 946f2e54 authored by claes's avatar claes

Allow restart

parent 07da7a6f
......@@ -479,8 +479,22 @@ int main ()
qAttr.type = qcom_eQtype_private;
qAttr.quota = 100;
if (!qcom_CreateQ(&sts, &myQid, &qAttr, "pwr_emon")) {
errh_Fatal("qcom_CreateQ, %m", sts);
exit(sts);
if (sts == QCOM__QALLREXIST) {
if (!qcom_AttachQ(&sts, &myQid)) {
if (!qcom_DeleteQ(&sts, &myQid)) {
errh_Fatal("qcom_DeleteQ, %m", sts);
exit(sts);
}
if (!qcom_CreateQ(&sts, &myQid, &qAttr, "pwr_emon")) {
errh_Fatal("qcom_CreateQ, %m", sts);
exit(sts);
}
}
}
else {
errh_Fatal("qcom_CreateQ, %m", sts);
exit(sts);
}
}
l.head.qid = myQid;
......
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