gsm/oap: more robust: decode presence as clearly either 1 or 0

Prepares for the unit test, which can now simply check for encode/decode
identity.

Change-Id: I410ff120d868e8d55df9cb19ba6eefd99749cdf0
diff --git a/src/gsm/oap.c b/src/gsm/oap.c
index 979bde6..1494a6a 100644
--- a/src/gsm/oap.c
+++ b/src/gsm/oap.c
@@ -92,7 +92,7 @@
 				return -GMM_CAUSE_PROTO_ERR_UNSPEC;
 			}
 			memcpy(oap_msg->autn, value, value_len);
-			oap_msg->autn_present = value_len;
+			oap_msg->autn_present = value_len ? 1 : 0;
 			break;
 
 		case OAP_RAND_IE:
@@ -103,7 +103,7 @@
 				return -GMM_CAUSE_PROTO_ERR_UNSPEC;
 			}
 			memcpy(oap_msg->rand, value, value_len);
-			oap_msg->rand_present = value_len;
+			oap_msg->rand_present = value_len ? 1 : 0;
 			break;
 
 		case OAP_XRES_IE:
@@ -114,7 +114,7 @@
 				return -GMM_CAUSE_PROTO_ERR_UNSPEC;
 			}
 			memcpy(oap_msg->xres, value, value_len);
-			oap_msg->xres_present = value_len;
+			oap_msg->xres_present = value_len ? 1 : 0;
 			break;
 
 		case OAP_AUTS_IE:
@@ -125,7 +125,7 @@
 				return -GMM_CAUSE_PROTO_ERR_UNSPEC;
 			}
 			memcpy(oap_msg->auts, value, value_len);
-			oap_msg->auts_present = value_len;
+			oap_msg->auts_present = value_len ? 1 : 0;
 			break;
 
 		case OAP_CAUSE_IE: