Re: modemmanager.proto issue?

2019-09-17 Thread Aleksander Morgado
Hey Amol,

>
> Regarding modemmanager.proto file @ 
> https://gitlab.freedesktop.org/mobile-broadband/mobile-broadband-openwrt/blob/master/modemmanager/files/modemmanager.proto
>
> Did you mean "while [ $idx -le $bearercount ];" in below function instead of 
> " while [ $idx -ge $bearercount ];" ?
>

Yes, that is wrong. I added a comment in @Nick B 's pull request to
openwrt packaging a while back, and he already fixed it there:
https://github.com/openwrt/packages/pull/9137#discussion_r306915291

Never got to fix that in the repo in fd.o because that should go away
as soon as the openwrt pull request is merged.

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

modemmanager.proto issue?

2019-09-17 Thread Amol Lad
Hi Aleksander,

Regarding modemmanager.proto file @ 
https://gitlab.freedesktop.org/mobile-broadband/mobile-broadband-openwrt/blob/master/modemmanager/files/modemmanager.proto

Did you mean "while [ $idx -le $bearercount ];" in below function instead of " 
while [ $idx -ge $bearercount ];" ?

modemmanager_cleanup_connection() {
local modemstatus="$1"

local bearercount idx bearerpath

bearercount=$(modemmanager_get_field "${modemstatus}" 
"modem.generic.bearers.length")

# do nothing if no bearers reported
[ -n "${bearercount}" ] && [ $bearercount -ge 1 ] && {
# explicitly disconnect just in case
/usr/bin/mmcli --modem="${device}" --simple-disconnect >/dev/null 2>&1
# and remove all bearer objects, if any found
idx=1
while [ $idx -ge $bearercount ]; do
bearerpath=$(modemmanager_get_field "${modemstatus}" 
"modem.generic.bearers.value\[$idx\]")
/usr/bin/mmcli --modem "${device}" --delete-bearer="${bearerpath}" >/dev/null 
2>&1
idx=$(expr $idx + 1)
done
}
}

Thanks
Amol

The information in this email communication (inclusive of attachments) is 
confidential to 4RF Limited and the intended recipient(s). If you are not the 
intended recipient(s), please note that any use, disclosure, distribution or 
copying of this information or any part thereof is strictly prohibited and that 
the author accepts no liability for the consequences of any action taken on the 
basis of the information provided. If you have received this email in error, 
please notify the sender immediately by return email and then delete all 
instances of this email from your system. 4RF Limited will not accept 
responsibility for any consequences associated with the use of this email 
(including, but not limited to, damages sustained as a result of any viruses 
and/or any action or lack of action taken in reliance on it).
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel