[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:
Holger Hans Peter Freyther 2009-12-28 12:23:02 +01:00
parent d2a818946e
commit 61f814de3c
2 changed files with 10 additions and 0 deletions

View File

@ -1568,6 +1568,12 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb)
rc = sw_load_end(sw);
}
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;
case SW_STATE_WAIT_ENDACK:

View File

@ -215,6 +215,10 @@ static int swload_cbfn(unsigned int hook, unsigned int event, struct msgb *msg,
printf("Software Download Progress: %d%%\n", percent);
percent_old = percent;
break;
case NM_MT_LOAD_ABORT:
fprintf(stderr, "ERROR: Load aborted by the BTS.\n");
exit(6);
break;
}
return 0;
}