Metaswitch/sprout — pull request #846 by mike-evans (2014-11-04 16:16:22+00:00)
Title: [Reviewer Andy] Remove bindings on 430 Flow Failed response

Andy

Can you review my fix to #837. In fixing this I slightly refactored the RegistrationUtils::network_initiated_deregistration method to be more general

- previously it required the caller to query iFCs first, then call network_initiated_deregistration, and it assumed there would always be no bindings left at the end of this processing (which was probably a bug)
- now it removes the specified binding (or all if * is specified) and only queries IFCs and does network initiated deregistration processing if all the bindings have gone.

I renamed it to remove_bindings as this seemed more appropriately general.

I've tested by updating the RegistrarTest for network initiated deregistration and added a UT for the 430 Flow Failed case to the SCSCFTests.

Mike