From 7f3b3584d023b23474e14b45a1df27cf11887242 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 27 Mar 2012 21:22:00 +0000 Subject: [PATCH] - scheduler: zero host.nsame_ip_addr if IP addr differs from previous svn path=/trunk/boinc/; revision=25500 --- checkin_notes | 6 ++++++ sched/handle_request.cpp | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index bd963e6722..239d076801 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3107,3 +3107,9 @@ David 27 Mar 2012 parse.cpp client/ app_control.cpp + +David 27 Mar 2012 + - scheduler: zero host.nsame_ip_addr if IP addr differs from previous + + sched/ + handle_request.cpp diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp index d4e13f377a..7cb1efe80e 100644 --- a/sched/handle_request.cpp +++ b/sched/handle_request.cpp @@ -506,7 +506,11 @@ static int modify_host_struct(HOST& host) { strlcat(host.serialnum, buf2, sizeof(host.serialnum)); } 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 { host.nsame_ip_addr++; }