mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-12-22 17:01:46 +00:00
The ntk-console client command console_uptime should now not print negative numbers, And inet_sendto should now properly print ipv4 addresses in a human readable format.
This commit is contained in:
parent
175f795a2b
commit
8bc5d69758
10
src/inet.c
10
src/inet.c
@ -1117,11 +1117,11 @@ inet_sendto(int s, const void *msg, size_t len, int flags,
|
||||
len-(len/2), flags, to, tolen);
|
||||
break;
|
||||
case EFAULT:
|
||||
error("To Family is: %hu "
|
||||
"To Data is: %%pNP "
|
||||
"and: %s", to->sa_family,
|
||||
to->sa_data,
|
||||
strerror(errno));
|
||||
error("Bad Address\n"
|
||||
"To Family is: %hu "
|
||||
"To Data is: %s",
|
||||
to->sa_family,
|
||||
inet_ntoa( &( ((struct sockaddr_in*)to)->sin_addr ) ));
|
||||
default:
|
||||
error("inet_sendto: Cannot send(): %s", strerror(errno));
|
||||
return err;
|
||||
|
@ -179,13 +179,13 @@ ntkd_request(command_t command)
|
||||
|
||||
void console_uptime(void) {
|
||||
|
||||
int uptime_sec1;
|
||||
int uptime_min1;
|
||||
int uptime_hour1;
|
||||
unsigned int uptime_sec1;
|
||||
unsigned int uptime_min1;
|
||||
unsigned int uptime_hour1;
|
||||
|
||||
int uptime_day1;
|
||||
int uptime_month1;
|
||||
int uptime_year1;
|
||||
unsigned int uptime_day1;
|
||||
unsigned int uptime_month1;
|
||||
unsigned int uptime_year1;
|
||||
|
||||
time(&rawtime);
|
||||
|
||||
|
@ -31,12 +31,12 @@ int rc, bytesReceived;
|
||||
time_t rawtime;
|
||||
struct tm *timeinfo;
|
||||
|
||||
int uptime_sec;
|
||||
int uptime_min;
|
||||
int uptime_hour;
|
||||
int uptime_day;
|
||||
int uptime_month;
|
||||
int uptime_year;
|
||||
unsigned int uptime_sec;
|
||||
unsigned int uptime_min;
|
||||
unsigned int uptime_hour;
|
||||
unsigned int uptime_day;
|
||||
unsigned int uptime_month;
|
||||
unsigned int uptime_year;
|
||||
|
||||
int i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user