[sccp] Make it optional to send data on a SCCP Connection Refuse

This can be used to send a Location Updating Reject down to the
BSC when it is clear that a subscriber is not allowed.
diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c
index 35589dc..f7c31e8 100644
--- a/openbsc/src/sccp/sccp.c
+++ b/openbsc/src/sccp/sccp.c
@@ -638,7 +638,7 @@
 		connection->state_cb(connection, old_state);
 }
 
-struct msgb *sccp_create_refuse(struct sccp_source_reference *src_ref, int cause)
+struct msgb *sccp_create_refuse(struct sccp_source_reference *src_ref, int cause, uint8_t *inp, int length)
 {
 	struct msgb *msgb;
 	struct sccp_connection_refused *ref;
@@ -660,6 +660,13 @@
 	ref->cause = cause;
 	ref->optional_start = 1;
 
+	if (inp) {
+		data = msgb_put(msgb, 1 + 1 + length);
+		data[0] = SCCP_PNC_DATA;
+		data[1] = length;
+		memcpy(&data[2], inp, length);
+	}
+
 	data = msgb_put(msgb, 1);
 	data[0] = SCCP_PNC_END_OF_OPTIONAL;
 	return msgb;
@@ -667,7 +674,7 @@
 
 static int _sccp_send_refuse(struct sccp_source_reference *src_ref, int cause)
 {
-	struct msgb *msgb = sccp_create_refuse(src_ref, cause);
+	struct msgb *msgb = sccp_create_refuse(src_ref, cause, NULL, 0);
 	if (!msgb)
 		return -1;