chiark / gitweb /
realtime: movpos: when calling movpos_change on a no-change indep, immediately finish...
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 9 Jan 2011 04:20:13 +0000 (04:20 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 9 Jan 2011 04:20:13 +0000 (04:20 +0000)
hostside/movpos.c

index b73a2ab32425364ace9d1f4e32499c570099e2f3..e919f4729c9fdea93e86a02887f688bfcb24907e 100644 (file)
@@ -692,6 +692,8 @@ static Method nomove_method= {
 #define METH_DPFX_FMT "%s " INDEP_DBG_FMT " "
 #define METH_DPFX_ARGS(indep, meth) ((meth).pname), INDEP_DBG_ARGS((indep))
 
+static void indep_indep_done(Indep *indep);
+
 static Method *methods[]= {
   [mfk_none] = (Method*)&nomove_method,
   [mfk_point] = (Method*)&points_method,
@@ -729,6 +731,10 @@ static void method_change_done(Method *m, Change *chg) {
     return;
   }
 
+  indep_indep_done(indep);
+}
+
+static void indep_indep_done(Indep *indep) {
   /* all done */
   Segment *move= indep->move;
   move->moving= 0;
@@ -1108,6 +1114,10 @@ ErrorCode movpos_change(Segment *move, MovPosComb target,
   ouposn_moving(inst);
   indep_check_execute();
 
+  if (!inst->n_changes)
+    /* oh! */
+    indep_indep_done(inst);
+
   DPRINTF(movpos,entry, "movpos change %s/%s ok\n",
          move->i->pname, movpos_pname(move, target));
   return 0;