- scheduler: zero host.nsame_ip_addr if IP addr differs from previous

svn path=/trunk/boinc/; revision=25500
This commit is contained in:
David Anderson 2012-03-27 21:22:00 +00:00
parent 39f5dc7e58
commit 7f3b3584d0
2 changed files with 11 additions and 1 deletions

View File

@ -3107,3 +3107,9 @@ David 27 Mar 2012
parse.cpp parse.cpp
client/ client/
app_control.cpp app_control.cpp
David 27 Mar 2012
- scheduler: zero host.nsame_ip_addr if IP addr differs from previous
sched/
handle_request.cpp

View File

@ -506,7 +506,11 @@ static int modify_host_struct(HOST& host) {
strlcat(host.serialnum, buf2, sizeof(host.serialnum)); strlcat(host.serialnum, buf2, sizeof(host.serialnum));
} }
if (strcmp(host.last_ip_addr, g_request->host.last_ip_addr)) { if (strcmp(host.last_ip_addr, g_request->host.last_ip_addr)) {
strncpy(host.last_ip_addr, g_request->host.last_ip_addr, sizeof(host.last_ip_addr)); strncpy(
host.last_ip_addr, g_request->host.last_ip_addr,
sizeof(host.last_ip_addr)
);
host.nsame_ip_addr = 0;
} else { } else {
host.nsame_ip_addr++; host.nsame_ip_addr++;
} }