New 'u-blox' plugin (v2)

Aleksander Morgado aleksander at aleksander.es
Wed Oct 12 11:17:40 UTC 2016


On Tue, Oct 11, 2016 at 10:13 AM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
>>> ublox: new +UBANDSEL? response parser
>>
>> +    dupstr = g_strdup (mm_strip_tag (response, "+UBANDSEL:"));
>> +    i = strlen (dupstr);
>> +    while (i > 0 && (dupstr[i - 1] == '\r' || dupstr[i - 1] == '\n' || dupstr[i - 1] == ' ')) {
>> +        dupstr[i - 1] = '\0';
>> +        i--;
>> +    }
>>
>> dupstr = g_strchomp (g_strdup (mm_strip_tag (response, "+UBANDSEL:")));
>>
>> Maybe?
>>
>
> But g_strchomp() doesn't remove LFs and CRs, right?

Oh, wait, it does remove them because CR and LF are considered
whitespaces :) Will change that.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list