Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?usp=email )
Change subject: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1 ......................................................................
Patch Set 2:
(1 comment)
File src/sctp_proxy.erl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122/comment/fbeb47ef_d7f17... PS2, Line 197: handle_pdu(Data) when is_binary(Data) ->
isn't the when_is_binary() and the spec declaring the param to be binary() actually the same? I thin […]
The spec is for Dialyzer, it does not affect the program logic IIUC. The `is_binary()` guard ensures that this function variant is only executed when the given argument is of a binary type. The idea is to ensure that we never pass `s1ap_proxy:handle_pdu/1` anything else than a binary, and thus never blame it a bug that is actually ours (this module's own).