LOGP(DMM, LOGL_INFO, "IMSI has been detached.\n");
- /* power off when IMSI is detached */
- if (mm->power_off) {
- l23_app_exit(ms);
- printf("Power off!\n");
- exit (0);
- }
-
/* stop IMSI detach timer (if running) */
stop_mm_t3220(mm);
/* SIM invalid */
subscr->sim_valid = 0;
+ /* power off when IMSI is detached */
+ if (mm->power_off) {
+ l23_app_exit(ms);
+ exit (0);
+ }
+
/* send SIM remove event to gsm322 */
nmsg = gsm322_msgb_alloc(GSM322_EVENT_SIM_REMOVE);
if (!nmsg)
LOGP(DMM, LOGL_INFO, "IMSI detach not required.\n");
new_mm_state(mm, GSM48_MM_ST_WAIT_NETWORK_CMD, 0);
+ /* power off when IMSI is detached */
+ if (mm->power_off) {
+ l23_app_exit(ms);
+ exit (0);
+ }
+
return 0;
}