From 6b5a0284493221d8f9d331304b99998b6054f77e Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 18 Jun 2010 10:16:01 +0000 Subject: [PATCH] lib: Fix the value returned from get_mac_addresses() on Macintosh computers. svn path=/trunk/boinc/; revision=21769 --- checkin_notes | 10 ++++++++++ lib/mac_address.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index d379d746e4..ae7162c65b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4363,3 +4363,13 @@ David 17 Jun 2010 html/inc/ prefs.inc + +Charlie 18 Jun 2010 + - lib: Fix the value returned from get_mac_addresses() on Macintosh + computers. It has returned the value of kernResult, which is 0 + on success, instead of true for success, since the routine was + first written in November 2008. This causes the client to + generate a new random CPID every time the client is launched. + + lib/ + mac_address.cpp diff --git a/lib/mac_address.cpp b/lib/mac_address.cpp index 371d45e701..7085bb5a9c 100644 --- a/lib/mac_address.cpp +++ b/lib/mac_address.cpp @@ -184,7 +184,7 @@ get_mac_addresses(char* addresses) { } IOObjectRelease(intfIterator); - return kernResult; + return (kernResult == KERN_SUCCESS); #elif defined(SIOCGIFCONF) || defined(SIOCGLIFCONF) char buf[1024];