mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-01-14 00:26:38 +00:00
Implement retries for when network stack fails NetConfigure.
This commit is contained in:
parent
afc785ba27
commit
10a5876ce7
1 changed files with 14 additions and 16 deletions
|
@ -1,21 +1,19 @@
|
||||||
|
|
||||||
Cd(__DIR__);;
|
Cd(__DIR__);;
|
||||||
#include "Load"
|
#include "Load"
|
||||||
NetConfigure;
|
I64 retries = 5;
|
||||||
|
while (ipv4_globals.local_ip == 0 && retries--) // local_ip is set if NetConfigure is successful
|
||||||
if (Fs != sys_task)
|
|
||||||
{
|
{
|
||||||
if (ipv4_globals.local_ip != 0) // is set if NetConfigure is successful
|
"\nNetConfigure unsuccessful. Retrying...\n";
|
||||||
{
|
NetConfigure;
|
||||||
NetRep;
|
}
|
||||||
|
if (ipv4_globals.local_ip == 0)
|
||||||
"\nNow run one of the $MA,"Tests",LM="Cd(\"C:/Home/Net/Tests\");Dir;\n"$ or $MA,"Programs",LM="Cd(\"C:/Home/Net/Programs\");Dir;\n"$.\n";
|
"\nNetConfigure unsuccessful. See Network Log for details.\n\n";
|
||||||
|
else
|
||||||
"\nIf a test crashes to Debug, try typing $FG,0$G2;$FG$\n\n";
|
"\nNetConfigure successful!\n\n";
|
||||||
}
|
NetRep;
|
||||||
else
|
if (ipv4_globals.local_ip != 0 && Fs != sys_task)
|
||||||
{
|
{
|
||||||
"\nNetConfigure unsuccessful. See Network Log for details.\n\n";
|
"\nNow run one of the $MA,"Programs",LM="Cd(\"C:/Home/Net/Programs\");Dir;\n"$.\n";
|
||||||
}
|
"\nIf anything crashes to Debug, try typing $FG,0$G2;$FG$\n\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue