lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses
......................................................................

iu_rnc: Use API osmo_sccp_addr_ri_cmp() to compare addresses

Change-Id: I04fb37f28b52da9eecb1f8ea40c38ee3eced1c29
---
M src/sgsn/iu_rnc.c
1 file changed, 1 insertion(+), 8 deletions(-)

Approvals:
  lynxis lazus: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/sgsn/iu_rnc.c b/src/sgsn/iu_rnc.c
index 970f628..b1af9ba 100644
--- a/src/sgsn/iu_rnc.c
+++ b/src/sgsn/iu_rnc.c
@@ -98,13 +98,6 @@
        return NULL;
 }

-static bool same_sccp_addr(const struct osmo_sccp_addr *a, const struct 
osmo_sccp_addr *b)
-{
-       char buf[256];
-       osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf));
-       return !strcmp(buf, osmo_sccp_addr_dump(b));
-}
-
 static void global_iu_event_new_area(const struct osmo_rnc_id *rnc_id, const 
struct osmo_routing_area_id *rai)
 {
        struct ranap_iu_event_new_area new_area = (struct 
ranap_iu_event_new_area) {
@@ -135,7 +128,7 @@
        rnc = iu_rnc_id_find(rnc_id);

        if (rnc) {
-               if (!same_sccp_addr(&rnc->sccp_addr, addr)) {
+               if (!osmo_sccp_addr_ri_cmp(&rnc->sccp_addr, addr)) {
                        LOGP(DRANAP, LOGL_NOTICE, "RNC %s changed its SCCP addr 
to %s (LAC/RAC %s)\n",
                             osmo_rnc_id_name(rnc_id), 
osmo_sccp_addr_dump(addr), osmo_rai_name2(rai));
                        rnc->sccp_addr = *addr;

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40971?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I04fb37f28b52da9eecb1f8ea40c38ee3eced1c29
Gerrit-Change-Number: 40971
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <[email protected]>

Reply via email to