osmo_char2bcd(): Implment hex digits a-f and A-F

osmo_bcd2char() has always supported both decimal and hex.

However, osmo_char2bcd() use to only implement decimal digits.

With this patch, it also suppots conversion of hex characters from ASCII
to BCD.

This would be relevant in cases where somebdoy would want to use 'code
11', 'code 12' or 'ST' signals in any addresses (SCCP GT e.g.)

Change-Id: I7bbcc6de08024567ab64765c12d7de71df787a7a
diff --git a/src/utils.c b/src/utils.c
index f5894d8..a62f5e9 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -117,7 +117,14 @@
  */
 uint8_t osmo_char2bcd(char c)
 {
-	return c - 0x30;
+	if (c >= '0' && c <= '9')
+		return c - 0x30;
+	else if (c >= 'A' && c <= 'F')
+		return 0xa + (c - 'A');
+	else if (c >= 'a' && c <= 'f')
+		return 0xa + (c - 'a');
+	else
+		return 0;
 }
 
 /*! Parse a string containing hexadecimal digits