~dwa/modemmanager/current-capabilities

Viewing all changes in revision 3350.

  • Committer: Aleksander Morgado
  • Date: 2013-04-02 07:53:46 UTC
  • Revision ID: git-v1:c1e70924d8197c51bb8dedb2d232f03dff87aa7b
broadband-modem: update CMGL parsing logic

Pantech UMW190 modem uses a custom +CMGL response which includes only
three fields before the actual PDU, e.g:

  +CMGL: <index>,<status>,<something>\r\n<PDU>

instead of what we had before:

  +CMGL: <index>,<status>,<alpha>,<length>\r\n<PDU>

The CMGL parsing logic is now updated to use a regex to match the reply, and
also considering the UMW190 specific case.

Actually, we end up reading only the two first fields (index and status) which
are the ones we really need, so we skip the <length> and the <alpha> if given.

Added also unit tests to cover all these known cases.

Partially fixes https://bugzilla.gnome.org/show_bug.cgi?id=696723 (missing the
actual PDU parsing fixes).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: