sgsn: Fill the cch_pdp with a value coming from the tlv structure

For some GGSNs we need to insert the PDP Charging Characteristics
that were returned. We receive these values from GSUP and will
fill them into the tlv structure when finding the ggsn context.

Change-Id: I1725bfd2403d29ce3550bfcd6fcc1498426ef906
diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c
index 176583b..aa03509 100644
--- a/src/gprs/gprs_subscriber.c
+++ b/src/gprs/gprs_subscriber.c
@@ -325,6 +325,13 @@
 		}
 	}
 
+	if (gsup_msg->pdp_charg_enc && gsup_msg->pdp_charg_enc_len >= sizeof(sdata->pdp_charg)) {
+		memcpy(&sdata->pdp_charg, gsup_msg->pdp_charg_enc, sizeof(sdata->pdp_charg));
+		sdata->has_pdp_charg = 1;
+	} else {
+		sdata->has_pdp_charg = 0;
+	}
+
 	if (gsup_msg->pdp_info_compl) {
 		rc = gprs_subscr_pdp_data_clear(subscr);
 		if (rc > 0)
@@ -368,6 +375,13 @@
 				pdp_info->apn_enc, pdp_info->apn_enc_len);
 		memcpy(pdp_data->qos_subscribed, pdp_info->qos_enc, pdp_info->qos_enc_len);
 		pdp_data->qos_subscribed_len = pdp_info->qos_enc_len;
+
+		if (pdp_info->pdp_charg_enc && pdp_info->pdp_charg_enc_len >= sizeof(pdp_data->pdp_charg)) {
+			memcpy(&pdp_data->pdp_charg, pdp_info->pdp_charg_enc, sizeof(pdp_data->pdp_charg));
+			pdp_data->has_pdp_charg = 1;
+		} else {
+			pdp_data->has_pdp_charg = 0;
+		}
 	}
 }