Store incoming SMS into SQL database
* gsm_util now uses caller-allocated data (rather than callee-allocated)
* correctly parse destination address
* parse (but not transcode) non-default encodings of SMS
* reject SMS to unknown destination number
* resolve target subscriber id and store incoming SMS (without header) in 'sms' table

What we're now missing is the sending part, i.e. a regular task iterating over
all pending SMS and trying to deliver them.  Also, check for pending SMS once
we get a LOCATION UPDATE.

diff --git a/tests/sms/sms_test.c b/tests/sms/sms_test.c
index bd628d1..2b55b97 100644
--- a/tests/sms/sms_test.c
+++ b/tests/sms/sms_test.c
@@ -80,8 +80,11 @@
         /* test 7-bit coding/decoding */
 	const char *input = "test text";
 	u_int8_t length;
-	u_int8_t *coded = gsm_7bit_encode(input, &length);
-	char *result = gsm_7bit_decode(coded, length);
+	u_int8_t coded[256];
+	char result[256];
+
+	length = gsm_7bit_encode(coded, input);
+	gsm_7bit_decode(result, coded, length);
 	if (strcmp(result, input) != 0) {
 		printf("7 Bit coding failed... life sucks\n");
 		printf("Wanted: '%s' got '%s'\n", input, result);