Change in ...osmo_ss7[master]: ipa_proto: Hook ipa_proto_ccm into the handling of CCM messages

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

matt9j gerrit-no-reply at lists.osmocom.org
Tue Sep 8 09:05:19 UTC 2020


matt9j has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/20017 )


Change subject: ipa_proto: Hook ipa_proto_ccm into the handling of CCM messages
......................................................................

ipa_proto: Hook ipa_proto_ccm into the handling of CCM messages

Change-Id: Ib1be00f73146519c8cc78bb08dd26a110771cd55
---
M src/ipa_proto.erl
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_ss7 refs/changes/17/20017/1

diff --git a/src/ipa_proto.erl b/src/ipa_proto.erl
index 9a3f3d0..20e5a1b 100644
--- a/src/ipa_proto.erl
+++ b/src/ipa_proto.erl
@@ -261,15 +261,15 @@
 	end.
 
 % Respond with PONG to PING
-process_ccm_msg(Socket, StreamID, ?IPAC_MSGT_PING, _) ->
+process_ccm_msg(Socket, StreamID, ping, _) ->
 	io:format("Socket ~p Stream ~p: PING -> PONG~n", [Socket, StreamID]),
 	send(Socket, StreamID, <<?IPAC_MSGT_PONG>>);
 % Simply respond to ID_ACK with ID_ACK
-process_ccm_msg(Socket, StreamID, ?IPAC_MSGT_ID_ACK, _) ->
+process_ccm_msg(Socket, StreamID, id_ack, _) ->
 	io:format("Socket ~p Stream ~p: ID_ACK -> ID_ACK~n", [Socket, StreamID]),
 	send(Socket, StreamID, <<?IPAC_MSGT_ID_ACK>>);
 % Simply respond to ID_RESP with ID_ACK
-process_ccm_msg(Socket, StreamID, ?IPAC_MSGT_ID_RESP, _) ->
+process_ccm_msg(Socket, StreamID, id_resp, _) ->
 	io:format("Socket ~p Stream ~p: ID_RESP -> ID_ACK~n", [Socket, StreamID]),
 	send(Socket, StreamID, <<?IPAC_MSGT_ID_ACK>>);
 % Default message handler for unknown messages
@@ -279,7 +279,7 @@
 
 % process an incoming CCM message (Stream ID 254)
 process_rx_ccm_msg(Socket, StreamID, PayloadBin) ->
-	[MsgType|Opts] = binary:bin_to_list(PayloadBin),
+	{MsgType, Opts} = ipa_proto_ccm:decode(PayloadBin),
 	process_ccm_msg(Socket, StreamID, MsgType, Opts).
 
 send_ccm_id_get(Socket) ->

-- 
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/20017
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo_ss7
Gerrit-Branch: master
Gerrit-Change-Id: Ib1be00f73146519c8cc78bb08dd26a110771cd55
Gerrit-Change-Number: 20017
Gerrit-PatchSet: 1
Gerrit-Owner: matt9j <matt9j at cs.washington.edu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200908/6eb9105a/attachment.htm>


More information about the gerrit-log mailing list