broadband-bearer: fix cid check in disconnect_3gpp
A value 0 is used to denote an invalid/uninitialized CID. This patch fixes a CID check in disconnect_3gpp() of MMBroadbandBearer such that it disables all PDP contexts via AT+CGACT=0 when no specific CID is used (i.e. cid == 0).
This commit is contained in:
committed by
Aleksander Morgado
parent
32d6dda859
commit
9f702aed02
@@ -1508,7 +1508,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
user_data);
|
||||
|
||||
/* If no specific CID was used, disable all PDP contexts */
|
||||
ctx->cgact_command = (cid >= 0 ?
|
||||
ctx->cgact_command = (cid > 0 ?
|
||||
g_strdup_printf ("+CGACT=0,%d", cid) :
|
||||
g_strdup_printf ("+CGACT=0"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user