get local ipaddr support interface based 1

pull/2/head
yuqing 2014-10-24 18:20:00 +08:00
parent 83a8b14174
commit 503cdc6006
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.09 2014-10-23 Version 1.09 2014-10-24
* Version struct add variable: patch * Version struct add variable: patch
* get local ipaddr support interface based 1
Version 1.08 2014-10-09 Version 1.08 2014-10-09
* sched_thread.c: calculate next_call_time correctly * sched_thread.c: calculate next_call_time correctly

View File

@ -146,12 +146,13 @@ int fast_timer_timeouts_get(FastTimer *timer, const int64_t current_time,
continue; continue;
} }
} }
else { else { //expired
count++; count++;
if (first == NULL) { if (first == NULL) {
first = entry; first = entry;
} }
} }
last = entry; last = entry;
entry = entry->next; entry = entry->next;
} }

View File

@ -1736,6 +1736,10 @@ int gethostaddrs(char **if_alias_prefixes, const int prefix_count, \
ret = ioctl(sock, SIOCGIFADDR, &req); ret = ioctl(sock, SIOCGIFADDR, &req);
if (ret == -1) if (ret == -1)
{ {
if (*count == 0 && k == 0) //maybe based 1
{
continue;
}
break; break;
} }