summaryrefslogtreecommitdiff
path: root/src/smsutil.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Introduce support for missing g_memdup2Marcel Holtmann2021-05-051-0/+1
|
* treewide: Replace g_memdup with g_memdup2Marcel Holtmann2021-04-281-3/+3
|
* util: Fix implicit enum conversionRichard Röjfors2020-12-221-1/+4
| | | | | | | | | | | | GCC10 complains about the following: src/smsutil.c: In function ‘sms_text_prepare_with_alphabet’: src/smsutil.c:3594:8: error: implicit conversion from ‘enum sms_alphabet’ to ‘enum gsm_dialect’ [-Werror=enum-conversion] 3594 | alphabet, &used_locking, smsutil and util has an enum each for representing the same thing; The SMS alphabet. They share the same values, so an explicit type cast makes GCC happy.
* cbs: Allow the last CBS fragment to be truncatedSlava Monich2020-06-181-8/+15
| | | | That does happen in real life.
* util: Switch character conversions to ellDenis Kenzior2018-12-271-10/+7
| | | | | | | | Switch various conversions from GSM/UCS2 to UTF8 from glib based implementation over to ell. This also converts all related g_free calls to l_free calls (though in the end they are equivalent calls to free)
* smsutil: Use l_utf8_from_utf16 instead of g_convertDenis Kenzior2018-12-271-12/+20
|
* util: Use l_utf8_to_ucs2be instead of g_convertDenis Kenzior2018-12-271-11/+10
|
* util: Use ell in convert_utf8_to_gsmDenis Kenzior2018-12-271-5/+5
|
* util: Convert pack7_bit / unpack_7bit to use l_mallocDenis Kenzior2018-12-271-2/+3
|
* util: Use bool instead of gbooleanDenis Kenzior2018-12-271-10/+10
|
* util: adding 8 national sms alphabetsNandini Rebello2018-10-151-2/+2
| | | | | Adding national language tables for hindi,kannada,malayalam, oriya,punjabi,tamil,telugu and urdu.
* util: add bengali and gujrati sms alphabetsNandini Rebello2018-10-011-2/+2
|
* smsutil: Prevent invalid access in cbs_decode_textSlava Monich2016-12-301-4/+5
| | | | | | | | | Valgrind was complaining about it like this: ==18099== Conditional jump or move depends on uninitialised value(s) ==18099== at 0x4C32281: strspn ==18099== by 0x41286B: cbs_decode_text (smsutil.c:4140) ==18099== by 0x40675C: test_cbs_encode_decode (test-sms.c:1417)
* smsutil: Fix receiving UTF-16 encoded messagesSlava Monich2016-11-181-4/+27
| | | | | | | | | The spec supports UCS2, but in reality UTF-16 is used, which supports 4-byte characters, which could be split into different message fragments. Accumulate the entire UTF-16 message before converting to UTF8. Author: Martin Jones <martin.jones@jolla.com>
* smsutil: Use g_slist_free_fullJohn Ernberg2016-04-221-14/+7
|
* smsutil: Do not check the origin portAlfonso Sanchez-Beato2015-09-081-3/+0
| | | | | Do not check if the origin port is reserved, as some operators use that range of values.
* smsutil: Add additional sanity checkDenis Kenzior2015-02-131-0/+5
| | | | | | We make sure that after performing the UTF8 -> GSM conversion, the number of GSM bytes is not greater than 11, which is the maximum payload.
* sms: Fix alphanumeric TP-OA handlingTommi Kenakkala2015-02-131-3/+9
| | | | | | | | | | | | | TP-OA max length comparisons were incorrect because TP-OA's 7-bit coded octets transport eleven 8-bit chars. The current code assumed only 10 chars were possible. The patch - increases the array size to 23, (maximum of 22 bytes for UTF8 encoding + null terminator) - Updates the sanity check to account for the correct maximum - For encoding, checks the maximum length in UTF8 characters instead of bytes
* smsutil: Make sure to return 1/0Denis Kenzior2013-09-031-1/+1
| | | | | | | | | So the value might be used directly for D-Bus property emission. Otherwise D-Bus asserts and screws itself with: ofonod[7427]: src/sms.c:handle_mwi() process 7427: arguments to dbus_message_iter_append_basic() were incorrect, assertion "*bool_p == 0 || *bool_p == 1" failed in file ../../dbus/dbus-message.c line 2549.
* smsutil: Fix warningDenis Kenzior2012-10-011-1/+1
| | | | | | src/smsutil.c: In function ‘cbs_decode_text’: src/smsutil.c:4116:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
* smsutil: Fix up style issues from previous commitDenis Kenzior2012-09-171-4/+3
|
* smsutil: <CR> is not necessarily a CBS padding characterPhilippe Nunes2012-09-171-2/+12
|
* smsutil: Fix CR padding logic for 7-bit caseDenis Kenzior2012-09-171-3/+11
|
* smsutil: Fix style issuesPhilippe Nunes2012-09-171-14/+14
|
* core: Update copyright informationMarcel Holtmann2011-10-101-1/+1
|
* smsutil: Mark variable properly as unusedMarcel Holtmann2011-05-291-4/+1
|
* smsutil: Fix missing error handling for strtol functionMarcel Holtmann2011-05-271-1/+3
|
* smsutil: fix a memory leakBertrand Aygon2011-03-181-1/+3
| | | | This was reported by cppcheck.
* smsutil: Fix compilationDenis Kenzior2011-02-031-2/+2
|
* smsutil: Add alphabet support to encodingAki Niemi2011-02-031-7/+46
|
* smsutil: do not allow larger file namesLucas De Marchi2011-01-281-2/+3
| | | | | | If file name had anything in the name after addr-msgid, it would be parsed as well. This is not what we want, since there could be temporary files lying around.
* smsutil: Don't bother renaming to the same nameDenis Kenzior2011-01-281-5/+12
| | | | | In sms_tx_queue_load, if the resulting file is the same (which is quite often the case) then don't bother trying to rename it.
* smsutil: Fix corner case during tx queue loadingDenis Kenzior2011-01-281-12/+12
| | | | | | If there are extraneous files in the directory when it is being loaded, then the index used to rename the old file into the new file can get out of sync with what the core expects.
* smsutil: simplify tx backup loadingDenis Kenzior2011-01-281-41/+11
| | | | | | glib functions as a rule do not use g_try* variations. They use g_malloc instead, so there's no need to check for out of memory conditions.
* sms: restore pending tx messages from backupLucas De Marchi2011-01-281-0/+181
| | | | Based on patch from: Kristen Carlson Accardi <kristen@linux.intel.com>
* sms: delete sent sms messages from backupLucas De Marchi2011-01-281-0/+47
| | | | Based on patch from Kristen Carlson Accardi <kristen@linux.intel.com>
* sms: store pending tx pdus on diskLucas De Marchi2011-01-281-0/+29
| | | | Based on patch from Kristen Carlson Accardi <kristen@linux.intel.com>
* smsutil: M15 coding style fixJeevaka Badrappan2011-01-121-1/+1
|
* smsutil: Make timezone an optional fieldYang Gu2010-12-081-1/+10
|
* smsutil: Change the range of time zoneYang Gu2010-12-071-2/+9
|
* smsutil: Minor style fixDenis Kenzior2010-12-071-1/+2
|
* smsutil: Fix issue in mwi dcs decodingJeevaka Badrappan2010-12-021-1/+6
|
* smsutil: Fix uninitialized optional elementsDenis Kenzior2010-12-021-2/+2
| | | | | | sms_decode was never memsetting the returned structure, so if any optional elements were present in the SMS (e.g. status report) then the structure was not completely initialized.
* smsutil: explicitly compare pointers to NULLLucas De Marchi2010-11-291-22/+17
| | | | | | | | | | | | | | This patch was generated by the following semantic patch (http://coccinelle.lip6.fr/) // <smpl> @fix disable is_null,isnt_null1@ expression *E; @@ - !E + E == NULL // </smpl>
* smsutil: coding style fixes - rule M6Jeevaka Badrappan2010-11-221-19/+19
|
* smsutil: Use entire range of ref / port addressesDenis Kenzior2010-11-041-12/+12
|
* smsutil: Remove traces of ref_offset variableDenis Kenzior2010-11-021-6/+2
|
* smsutil: Add sms_datagram_prepareDenis Kenzior2010-11-021-0/+129
|
* smsutil: Get rid of ref_offset in sms_text_prepareDenis Kenzior2010-11-021-11/+3
| | | | | | | The reason for this parameter has ceased to exist quite a while ago. Namely when the API allowed multiple SMS recipients. We prepared a single set of segments and then reset the to address and reference. We no longer allow multiple recipients and none of this is now needed.
* smsutil: Additional sanity checks for decode_sctsDenis Kenzior2010-11-021-0/+21
|