summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-11 13:14:10 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-11 13:14:10 -0800
commitec4ffc0c2c269660c3e4a3ab2315d098e82bc676 (patch)
tree0a1aaba2278a685718bc2918cbe5009a4252075a
parenta22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c (diff)
downloadinfinitytier-ec4ffc0c2c269660c3e4a3ab2315d098e82bc676.tar.gz
infinitytier-ec4ffc0c2c269660c3e4a3ab2315d098e82bc676.zip
Software update fetcher seems to work, going back to updater/installer itself.
-rw-r--r--make-linux.mk4
-rw-r--r--make-mac.mk6
-rw-r--r--node/SoftwareUpdater.cpp2
3 files changed, 11 insertions, 1 deletions
diff --git a/make-linux.mk b/make-linux.mk
index d57bc5f4..cb4631d9 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -5,6 +5,10 @@ INCLUDES=
DEFS=
LIBS=
+ifeq ($(ZT_AUTO_UPDATE),1)
+ DEFS+=-DZT_AUTO_UPDATE
+endif
+
# Uncomment for a release optimized build
CFLAGS=-Wall -O3 -fno-unroll-loops -fvisibility=hidden -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
STRIP=strip --strip-all
diff --git a/make-mac.mk b/make-mac.mk
index 9f0d7d8c..db7384e5 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -2,9 +2,13 @@ CC=clang
CXX=clang++
INCLUDES=
-DEFS=-DZT_AUTO_UPDATE
+DEFS=
LIBS=-lm
+ifeq ($(ZT_AUTO_UPDATE),1)
+ DEFS+=-DZT_AUTO_UPDATE
+endif
+
# Uncomment for a release optimized universal binary build
CFLAGS=-arch i386 -arch x86_64 -Wall -O4 -pthread -mmacosx-version-min=10.6 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
STRIP=strip
diff --git a/node/SoftwareUpdater.cpp b/node/SoftwareUpdater.cpp
index 4cb2f7e4..c515d5db 100644
--- a/node/SoftwareUpdater.cpp
+++ b/node/SoftwareUpdater.cpp
@@ -176,6 +176,8 @@ void SoftwareUpdater::_cbHandleGetLatestVersionBinary(void *arg,int code,const s
::close(fd);
::chmod(updatePath.c_str(),0755);
+ upd->_status = UPDATE_STATUS_IDLE;
+
_r->node->terminate(Node::NODE_RESTART_FOR_UPGRADE,updatePath.c_str());
#endif