Hey
When I read the MM code, the bearer treat the cid=0 as a invalid CID
confused me.  But I think there may be some special reasons.
In the MM Ver1.10.0 source code, src/mm-broadband-bearer.c

*static guint*
*cid_selection_3gpp_finish (MMBroadbandBearer  *self,*
*                           GAsyncResult       *res,*
*                           GError            **error)*
*{*
*    gssize cid;*

*    /* We return 0 as an invalid CID, not -1 */*
*    cid = g_task_propagate_int (G_TASK (res), error);*
*    return (guint) (cid < 0 ? 0 : cid);*
*}*

As my Intel 7560 module(not in Mbim on Linux),  after set AT+COPS=0 , it
would auto get IP on the cid=0 PDP.
Then the MM logic would treat the cid=0 as invalid, after that MM would
creat a new PDP context with +CGDCONT=1,*,*.
Though it works at the end. But I think it is better to use the auto
connect one that cid=0.
So what are the special reasons for the cid=0 invalid? Or maybe can we use
*#define INVALID_CID G_MAXUINT*
as a invalid cid?

Quincy
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to