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/include/openbsc/gsm_utils.h b/include/openbsc/gsm_utils.h
index b5637c8..c468371 100644
--- a/include/openbsc/gsm_utils.h
+++ b/include/openbsc/gsm_utils.h
@@ -2,6 +2,7 @@
 /*
  * (C) 2008 by Daniel Willmann <daniel@totalueberwachung.de>
  * (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2009 by Harald Welte <laforge@gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -26,7 +27,7 @@
 
 #include <sys/types.h>
 
-char *gsm_7bit_decode(u_int8_t *user_data, u_int8_t length);
-u_int8_t *gsm_7bit_encode(const char *data, u_int8_t *length);
+int gsm_7bit_decode(char *decoded, const u_int8_t *user_data, u_int8_t length);
+int gsm_7bit_encode(u_int8_t *result, const char *data);
 
 #endif