self.handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"failed to create fulfillReadyToSendIceUpdatesPromise"))
self.handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"failed to create fulfillReadyToSendIceUpdatesPromise", file:#file,function:#function,line:#line))
return
return
}
}
@ -421,7 +421,7 @@ protocol CallServiceObserver: class {
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"peerConnectionClient was unexpectedly nil in \(#function)"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"peerConnectionClient was unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
@ -709,7 +709,7 @@ protocol CallServiceObserver: class {
AssertIsOnMainThread()
AssertIsOnMainThread()
guardletcall=self.callelse{
guardletcall=self.callelse{
self.handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"ignoring local ice candidate, since there is no current call."))
self.handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"ignoring local ice candidate, since there is no current call.", file:#file,function:#function,line:#line))
return
return
}
}
@ -724,7 +724,7 @@ protocol CallServiceObserver: class {
self.handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"ignoring local ice candidate, since call is now idle."))
self.handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"ignoring local ice candidate, since call is now idle.", file:#file,function:#function,line:#line))
return
return
}
}
@ -760,7 +760,7 @@ protocol CallServiceObserver: class {
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call."))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call.", file:#file,function:#function,line:#line))
return
return
}
}
@ -829,14 +829,14 @@ protocol CallServiceObserver: class {
guardletcall=self.callelse{
guardletcall=self.callelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call was unexpectedly nil in \(#function)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call was unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
guardcall.localId==localIdelse{
guardcall.localId==localIdelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)")
owsFail("\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)", file:#file,function:#function,line:#line))
return
return
}
}
@ -852,7 +852,7 @@ protocol CallServiceObserver: class {
Logger.debug("\(TAG) in \(#function)")
Logger.debug("\(TAG) in \(#function)")
guardletcurrentCall=self.callelse{
guardletcurrentCall=self.callelse{
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call", file:#file,function:#function,line:#line))
return
return
}
}
@ -864,7 +864,7 @@ protocol CallServiceObserver: class {
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) peerConnectionClient unexpectedly nil in \(#function)"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) peerConnectionClient unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
@ -919,14 +919,14 @@ protocol CallServiceObserver: class {
guardletcall=self.callelse{
guardletcall=self.callelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call was unexpectedly nil in \(#function)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call was unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
guardcall.localId==localIdelse{
guardcall.localId==localIdelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)")
owsFail("\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) callLocalId:\(localId) doesn't match current calls: \(call.localId)", file:#file,function:#function,line:#line))
return
return
}
}
@ -965,17 +965,17 @@ protocol CallServiceObserver: class {
AssertIsOnMainThread()
AssertIsOnMainThread()
guardletcurrentCall=self.callelse{
guardletcurrentCall=self.callelse{
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) since there is no current call", file:#file,function:#function,line:#line))
return
return
}
}
guardcall==currentCallelse{
guardcall==currentCallelse{
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) for call other than current call"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) ignoring \(#function) for call other than current call", file:#file,function:#function,line:#line))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) missing peerconnection client in \(#function)"))
handleFailedCall(failedCall:call,error:OWSProdCallAssertionError(description:"\(TAG) missing peerconnection client in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
@ -1015,7 +1015,7 @@ protocol CallServiceObserver: class {
guardletcall=self.callelse{
guardletcall=self.callelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call unexpectedly nil in \(#function)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
@ -1069,7 +1069,7 @@ protocol CallServiceObserver: class {
guardletcall=self.callelse{
guardletcall=self.callelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
owsFail("\(TAG) call was unexpectedly nil in \(#function)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call unexpectedly nil in \(#function)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) call unexpectedly nil in \(#function)", file:#file,function:#function,line:#line))
return
return
}
}
@ -1107,7 +1107,7 @@ protocol CallServiceObserver: class {
guardletcall=self.callelse{
guardletcall=self.callelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) received data message, but there is no current call. Ignoring.")
owsFail("\(TAG) received data message, but there is no current call. Ignoring.")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received data message, but there is no current call. Ignoring."))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received data message, but there is no current call. Ignoring.", file:#file,function:#function,line:#line))
return
return
}
}
@ -1119,7 +1119,7 @@ protocol CallServiceObserver: class {
guardconnected.id==call.signalingIdelse{
guardconnected.id==call.signalingIdelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) received connected message for call with id:\(connected.id) but current call has id:\(call.signalingId)")
owsFail("\(TAG) received connected message for call with id:\(connected.id) but current call has id:\(call.signalingId)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received connected message for call with id:\(connected.id) but current call has id:\(call.signalingId)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received connected message for call with id:\(connected.id) but current call has id:\(call.signalingId)", file:#file,function:#function,line:#line))
return
return
}
}
@ -1134,7 +1134,7 @@ protocol CallServiceObserver: class {
guardhangup.id==call.signalingIdelse{
guardhangup.id==call.signalingIdelse{
//Thisshouldneverhappen;returntoaknowngoodstate.
//Thisshouldneverhappen;returntoaknowngoodstate.
owsFail("\(TAG) received hangup message for call with id:\(hangup.id) but current call has id:\(call.signalingId)")
owsFail("\(TAG) received hangup message for call with id:\(hangup.id) but current call has id:\(call.signalingId)")
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received hangup message for call with id:\(hangup.id) but current call has id:\(call.signalingId)"))
handleFailedCurrentCall(error:OWSProdCallAssertionError(description:"\(TAG) received hangup message for call with id:\(hangup.id) but current call has id:\(call.signalingId)", file:#file,function:#function,line:#line))
return
return
}
}
@ -1241,7 +1241,7 @@ protocol CallServiceObserver: class {