~singpolyma/cheogram-sip

d993c60d283abca6cefb33590b0647d636380d17 — Stephen Paul Weber 8 months ago c4ef096
Instead of crash on bad stanza, at least log it
1 files changed, 3 insertions(+), 4 deletions(-)

M gateway.hs
M gateway.hs => gateway.hs +3 -4
@@ 196,10 196,9 @@ main = do
					forM_ minit $ \init -> do
						liftIO $ Cache.delete sessionInitiates sid
						XMPP.putStanza $ iqError errPayload init
				| otherwise ->
					let
						Just from = realToAsterisk componentJid sfrom (receivedTo stanza)
					in
				| Just from <- realToAsterisk componentJid sfrom (receivedTo stanza) ->
					bounceStanza stanza from asteriskJid
				| otherwise ->
					print ("DUNNO", stanza)

	return ()