From d48c5ff86b5df78e1fe55ade8cfac61889a48b7a Mon Sep 17 00:00:00 2001 From: jjako Date: Mon, 26 Jan 2004 22:25:40 +0000 Subject: Fixed long constant warning on FreeBSD --- gtp/gtp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gtp') diff --git a/gtp/gtp.c b/gtp/gtp.c index 45b4386..9b1c5ad 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -416,7 +416,7 @@ int gtp_req(struct gsn_t *gsn, int version, struct pdp_t *pdp, packet->gtp0.h.length = hton16(len - GTP0_HEADER_SIZE); packet->gtp0.h.seq = hton16(gsn->seq_next); if (pdp) - packet->gtp0.h.tid = (pdp->imsi & 0x0fffffffffffffff) + + packet->gtp0.h.tid = (pdp->imsi & 0x0fffffffffffffffull) + ((uint64_t)pdp->nsapi << 60); if (pdp && ((packet->gtp0.h.type == GTP_GPDU) || (packet->gtp0.h.type == GTP_ERROR))) @@ -1226,8 +1226,8 @@ int gtp_create_pdp_ind(struct gsn_t *gsn, int version, memset(pdp, 0, sizeof(struct pdp_t)); if (version == 0) { - pdp->imsi = ((union gtp_packet*)pack)->gtp0.h.tid & 0x0fffffffffffffff; - pdp->nsapi = (((union gtp_packet*)pack)->gtp0.h.tid & 0xf000000000000000) >> 60; + pdp->imsi = ((union gtp_packet*)pack)->gtp0.h.tid & 0x0fffffffffffffffull; + pdp->nsapi = (((union gtp_packet*)pack)->gtp0.h.tid & 0xf000000000000000ull) >> 60; } pdp->seq = seq; @@ -1899,8 +1899,8 @@ int gtp_update_pdp_ind(struct gsn_t *gsn, int version, /* For GTP1 we must use imsi and nsapi if imsi is present. Otherwise */ /* we have to use the tunnel endpoint identifier */ if (version == 0) { - imsi = ((union gtp_packet*)pack)->gtp0.h.tid & 0x0fffffffffffffff; - nsapi = (((union gtp_packet*)pack)->gtp0.h.tid & 0xf000000000000000) >> 60; + imsi = ((union gtp_packet*)pack)->gtp0.h.tid & 0x0fffffffffffffffull; + nsapi = (((union gtp_packet*)pack)->gtp0.h.tid & 0xf000000000000000ull) >> 60; /* Find the context in question */ if (pdp_getimsi(&pdp, imsi, nsapi)) { -- cgit v1.2.1