Browse code

OA q/f: clear OA state upon sending final non-ok reply

Václav Kubart authored on 07/01/2014 13:06:13
Showing 1 changed files
... ...
@@ -413,6 +413,14 @@ int AmOfferAnswer::onReplyOut(AmSipReply& reply)
413 413
     return -1;
414 414
   }
415 415
 
416
+  if( (reply.code >= 300) &&
417
+      (reply.cseq == cseq) ) {
418
+    // final error reply -> cleanup OA state
419
+    DBG("after %u reply to %s: resetting OA state\n",
420
+	reply.code, reply.cseq_method.c_str());
421
+    clearTransitionalState();
422
+  }
423
+
416 424
   return 0;
417 425
 }
418 426