-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix calc_sever print_status npe bug #387
Conversation
CMakeLists.txt
Outdated
include_directories(BEFORE | ||
/usr/local/opt/openssl/include | ||
/opt/homebrew/opt/[email protected]/include | ||
) | ||
link_directories( | ||
/usr/local/opt/openssl/lib | ||
/opt/homebrew/opt/[email protected]/lib | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please make a separate PR for this? There are two different fixes here. And also I recommend
if (APPLE)
execute_process(COMMAND brew --prefix OUTPUT_VARIABLE BREW_PREFIX)
message(STATUS "brew prefix ${BREW_PREFIX}")
include_directories(BEFORE
${BREW_PREFIX}/opt/[email protected]/include
/usr/local/opt/openssl/include
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I will do it later.
examples/calculator/calc_server.cxx
Outdated
<< ((stuff.sm_->last_snapshot() != nullptr) ? stuff.sm_->last_snapshot()->get_last_log_idx() : 0) << std::endl | ||
<< "last snapshot log term: " | ||
<< stuff.sm_->last_snapshot()->get_last_log_term() << std::endl | ||
<< ((stuff.sm_->last_snapshot() != nullptr) ? stuff.sm_->last_snapshot()->get_last_log_term() : 0) << std::endl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please break lines at 90 chars
Line 7 in 71c3340
ColumnLimit: 90 |
Also it can be simplified as follows
(stuff.sm_->last_snapshot() ? stuff.sm_->last_snapshot()->get_last_log_idx() : 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
1、 fix ssl library path not found in my mac m1.
2、fix example npe bugs.