Fixed pseudo length of IMMEDIATE ASSIGNMENT message.

The pseudo length may not include the rest-octets, so it stays compatible
to non-GPRS phones.

At pcu_l1_if.c (OpenBTS) no pseudo length is given, so the frame is
only 22 bytes long. I could not test if it works.
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index b68af3f..4adbe7d 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -322,6 +322,7 @@
 	uint8_t polling, uint32_t poll_fn)
 {
 	unsigned wp = 0;
+	uint8_t plen;
 
 	bitvec_write_field(dest, wp,0x0,4);  // Skip Indicator
 	bitvec_write_field(dest, wp,0x6,4);  // Protocol Discriminator
@@ -356,6 +357,13 @@
 	// A zero-length LV.  Just write L=0.
 	bitvec_write_field(dest, wp,0,8);
 
+	if ((wp % 8)) {
+		LOGP(DRLCMACUL, LOGL_ERROR, "Length of IMM.ASS without rest "
+			"octets is not multiple of 8 bits, PLEASE FIX!\n");
+		exit (0);
+	}
+	plen = wp / 8;
+
 	if (downlink)
 	{
 		// GSM 04.08 10.5.2.16 IA Rest Octets
@@ -405,10 +413,7 @@
 		bitvec_write_field(dest, wp, 0, 1);    // TBF_STARTING_TIME_FLAG
 	}
 
-	if (wp%8)
-		return wp/8+1;
-	else
-		return wp/8;
+	return plen;
 }
 
 /* generate uplink assignment */