mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
Improve error clearing logic.
This commit is contained in:
parent
81cd7e06bb
commit
b4c70f0bb6
@ -88,7 +88,6 @@ static void networkinstall_close_client(network_install_data* data) {
|
||||
data->currProcessed = 0;
|
||||
data->currTotal = 0;
|
||||
|
||||
memset(&data->installResult, 0, sizeof(data->installResult));
|
||||
data->installCancelEvent = 0;
|
||||
}
|
||||
|
||||
@ -142,6 +141,8 @@ static void networkinstall_install_update(ui_view* view, void* data, float* prog
|
||||
networkInstallData->currProcessed = 0;
|
||||
networkInstallData->currTotal = 0;
|
||||
|
||||
memset(&networkInstallData->installResult, 0, sizeof(networkInstallData->installResult));
|
||||
|
||||
u8 ack = 1;
|
||||
if(sendwait(networkInstallData->clientSocket, &ack, sizeof(ack), 0) < 0) {
|
||||
networkinstall_close_client(networkInstallData);
|
||||
@ -282,6 +283,9 @@ void networkinstall_open(FS_MediaType dest) {
|
||||
data->processed = 0;
|
||||
data->total = 0;
|
||||
|
||||
memset(&data->installResult, 0, sizeof(data->installResult));
|
||||
data->installCancelEvent = 0;
|
||||
|
||||
ui_view* view = (ui_view*) calloc(1, sizeof(ui_view));
|
||||
view->name = "Network Install";
|
||||
view->info = "B: Return";
|
||||
|
Loading…
x
Reference in New Issue
Block a user