[ipaccess] Handle LoadAbort coming from the BTS.
* Be bale to abort the load when the BTS is rejecting the file..
This commit is contained in:
parent
d2a818946e
commit
61f814de3c
|
@ -1568,6 +1568,12 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb)
|
||||||
rc = sw_load_end(sw);
|
rc = sw_load_end(sw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case NM_MT_LOAD_ABORT:
|
||||||
|
if (sw->cbfn)
|
||||||
|
sw->cbfn(GSM_HOOK_NM_SWLOAD,
|
||||||
|
NM_MT_LOAD_ABORT, mb,
|
||||||
|
sw->cb_data, NULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SW_STATE_WAIT_ENDACK:
|
case SW_STATE_WAIT_ENDACK:
|
||||||
|
|
|
@ -215,6 +215,10 @@ static int swload_cbfn(unsigned int hook, unsigned int event, struct msgb *msg,
|
||||||
printf("Software Download Progress: %d%%\n", percent);
|
printf("Software Download Progress: %d%%\n", percent);
|
||||||
percent_old = percent;
|
percent_old = percent;
|
||||||
break;
|
break;
|
||||||
|
case NM_MT_LOAD_ABORT:
|
||||||
|
fprintf(stderr, "ERROR: Load aborted by the BTS.\n");
|
||||||
|
exit(6);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue