Make function decode_scts public
authorYang Gu <yang.gu@intel.com>
Fri, 2 Apr 2010 06:20:33 +0000 (14:20 +0800)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 2 Apr 2010 16:00:56 +0000 (11:00 -0500)
src/smsutil.c
src/smsutil.h

index 64cd6fb..17e0e0e 100644 (file)
@@ -377,7 +377,7 @@ guint8 sms_decode_semi_octet(guint8 in)
        return (in & 0x0f) * 10 + (in >> 4);
 }
 
-static gboolean decode_scts(const unsigned char *pdu, int len,
+gboolean sms_decode_scts(const unsigned char *pdu, int len,
                                int *offset, struct sms_scts *out)
 {
        unsigned char oct = 0;
@@ -433,7 +433,7 @@ static gboolean decode_validity_period(const unsigned char *pdu, int len,
 
                return TRUE;
        case SMS_VALIDITY_PERIOD_FORMAT_ABSOLUTE:
-               if (!decode_scts(pdu, len, offset, &vp->absolute))
+               if (!sms_decode_scts(pdu, len, offset, &vp->absolute))
                        return FALSE;
 
                return TRUE;
@@ -718,7 +718,7 @@ static gboolean decode_deliver(const unsigned char *pdu, int len,
        if (!next_octet(pdu, len, &offset, &out->deliver.dcs))
                return FALSE;
 
-       if (!decode_scts(pdu, len, &offset, &out->deliver.scts))
+       if (!sms_decode_scts(pdu, len, &offset, &out->deliver.scts))
                return FALSE;
 
        if (!next_octet(pdu, len, &offset, &out->deliver.udl))
@@ -849,7 +849,7 @@ static gboolean decode_submit_report(const unsigned char *pdu, int len,
 
        pi = octet & 0x07;
 
-       if (!decode_scts(pdu, len, &offset, scts))
+       if (!sms_decode_scts(pdu, len, &offset, scts))
                return FALSE;
 
        if (pi & 0x01) {
@@ -976,10 +976,10 @@ static gboolean decode_status_report(const unsigned char *pdu, int len,
                                        &out->status_report.raddr))
                return FALSE;
 
-       if (!decode_scts(pdu, len, &offset, &out->status_report.scts))
+       if (!sms_decode_scts(pdu, len, &offset, &out->status_report.scts))
                return FALSE;
 
-       if (!decode_scts(pdu, len, &offset, &out->status_report.dt))
+       if (!sms_decode_scts(pdu, len, &offset, &out->status_report.dt))
                return FALSE;
 
        if (!next_octet(pdu, len, &offset, &octet))
index fd80c8f..469a49e 100644 (file)
@@ -424,6 +424,9 @@ gboolean sms_encode_address_field(const struct sms_address *in, gboolean sc,
 
 guint8 sms_decode_semi_octet(guint8 in);
 
+gboolean sms_decode_scts(const unsigned char *pdu, int len,
+                               int *offset, struct sms_scts *out);
+
 int sms_udl_in_bytes(guint8 ud_len, guint8 dcs);
 
 time_t sms_scts_to_time(const struct sms_scts *scts, struct tm *remote);