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:
MissValeska 2014-10-26 09:31:49 -07:00
parent 175f795a2b
commit 8bc5d69758
3 changed files with 17 additions and 17 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;