fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/15369


Change subject: gtp/gtp.c: cosmetic: use get_tid() where we need TID
......................................................................

gtp/gtp.c: cosmetic: use get_tid() where we need TID

Change-Id: I39e92f25ed51665c8a615826ed52f35024bdd54b
---
M gtp/gtp.c
1 file changed, 3 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/69/15369/1

diff --git a/gtp/gtp.c b/gtp/gtp.c
index 8b2373e..5af877c 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -1423,11 +1423,8 @@
        pdp = &pdp_buf;
        memset(pdp, 0, sizeof(struct pdp_t));

-       if (version == 0) {
-               uint64_t tid = be64toh(((union gtp_packet *)pack)->gtp0.h.tid);
-
-               pdp_set_imsi_nsapi(pdp, tid);
-       }
+       if (version == 0)
+               pdp_set_imsi_nsapi(pdp, get_tid(pack));

        pdp->seq = seq;
        pdp->sa_peer = *peer;
@@ -2737,7 +2734,7 @@

        /* Find the context in question */
        if (version == 0) {
-               if (gtp_pdp_tidget(gsn, &pdp, be64toh(((union gtp_packet 
*)pack)->gtp0.h.tid))) {
+               if (gtp_pdp_tidget(gsn, &pdp, get_tid(pack))) {
                        gsn->err_unknownpdp++;
                        GTP_LOGPKG(LOGL_ERROR, peer, pack, len,
                                    "Unknown PDP context\n");

--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/15369
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I39e92f25ed51665c8a615826ed52f35024bdd54b
Gerrit-Change-Number: 15369
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to