modemmanager: experimental patch to not fail the whole modem if there's no sim
This commit is contained in:
parent
e87cda2e55
commit
4fc59fa2ac
|
@ -112,6 +112,8 @@ let
|
||||||
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
# jackett doesn't allow customization of the bind address: this will probably always be here.
|
||||||
jackett = callPackage ./patched/jackett { inherit (unpatched) jackett; };
|
jackett = callPackage ./patched/jackett { inherit (unpatched) jackett; };
|
||||||
|
|
||||||
|
modemmanager = callPackage ./patched/modemmanager { inherit (unpatched) modemmanager; };
|
||||||
|
|
||||||
phoc = callPackage ./patched/phoc { inherit (unpatched) phoc; };
|
phoc = callPackage ./patched/phoc { inherit (unpatched) phoc; };
|
||||||
|
|
||||||
|
|
||||||
|
|
6
pkgs/patched/modemmanager/default.nix
Normal file
6
pkgs/patched/modemmanager/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ modemmanager }: modemmanager.overrideAttrs (upstream: {
|
||||||
|
patches = (upstream.patches or []) ++ [
|
||||||
|
# don't go into the "fail" state just because we can't figure out if the SIM is unlocked
|
||||||
|
./missing-sim-not-fatal.patch
|
||||||
|
];
|
||||||
|
})
|
41
pkgs/patched/modemmanager/missing-sim-not-fatal.patch
Normal file
41
pkgs/patched/modemmanager/missing-sim-not-fatal.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
commit bf4b81671e9bd073efc95a2fa4d4c05c3174104f
|
||||||
|
Author: Colin <colin@uninsane.org>
|
||||||
|
Date: 2023-08-17 07:50:32 +0000
|
||||||
|
|
||||||
|
don't enter failed state due to missing sim
|
||||||
|
|
||||||
|
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
|
||||||
|
index 911c139d..c6550ccd 100644
|
||||||
|
--- a/src/mm-iface-modem.c
|
||||||
|
+++ b/src/mm-iface-modem.c
|
||||||
|
@@ -3773,7 +3773,8 @@ internal_load_unlock_required_ready (MMIfaceModem *self,
|
||||||
|
} else {
|
||||||
|
mm_obj_dbg (self, "couldn't check if unlock required: %s", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
- ctx->lock = MM_MODEM_LOCK_UNKNOWN;
|
||||||
|
+ mm_obj_info(self, "faking unlock state (Colin patch)");
|
||||||
|
+ ctx->lock = MM_MODEM_LOCK_NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -5177,13 +5178,13 @@ modem_update_lock_info_ready (MMIfaceModem *self,
|
||||||
|
/* NOTE: we already propagated the lock state, no need to do it again */
|
||||||
|
mm_iface_modem_update_lock_info_finish (self, res, &ctx->fatal_error);
|
||||||
|
if (ctx->fatal_error) {
|
||||||
|
- g_prefix_error (&ctx->fatal_error,
|
||||||
|
- "Couldn't check unlock status: ");
|
||||||
|
- /* Jump to the last step */
|
||||||
|
- ctx->step = INITIALIZATION_STEP_LAST;
|
||||||
|
- } else
|
||||||
|
- /* Go on to next step */
|
||||||
|
- ctx->step++;
|
||||||
|
+ mm_obj_info (self, "ignoring 'couldnt check unlock status' error (sane patch)");
|
||||||
|
+ g_error_free (ctx->fatal_error);
|
||||||
|
+ ctx->fatal_error = NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Go on to next step */
|
||||||
|
+ ctx->step++;
|
||||||
|
|
||||||
|
interface_initialization_step (task);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user