Skip to content
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

Re-define an undefined endpoint #322

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMake/build-from-src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function(build_from_src [dep])
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./config -fPIC --prefix=${BINARY_DIR} --openssldir=${BINARY_DIR} shared
BUILD_COMMAND make -j 1 # https://github.com/openssl/openssl/issues/5762#issuecomment-376622684
INSTALL_COMMAND $(MAKE) install
INSTALL_COMMAND make install
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
Expand Down
4 changes: 2 additions & 2 deletions net/kernel_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,8 +1035,8 @@ extern "C" ISocketServer* new_fstack_dpdk_socket_server() {

/* Implementations in socket.h */

EndPoint::EndPoint(const char* s) {
estring_view ep(s);
EndPoint::EndPoint(const char* _ep) {
estring_view ep(_ep);
auto pos = ep.find_last_of(':');
if (pos == estring::npos)
return;
Expand Down
5 changes: 3 additions & 2 deletions net/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ namespace net {
uint16_t port = 0;
EndPoint() = default;
EndPoint(IPAddr ip, uint16_t port) : addr(ip), port(port) {}
explicit EndPoint(const char* s);
explicit EndPoint(const char* ep);
EndPoint(const char* ip, uint16_t port) : addr(ip), port(port) {}
bool is_ipv4() const {
return addr.is_ipv4();
};
Expand All @@ -161,7 +162,7 @@ namespace net {
return !operator==(rhs);
}
bool undefined() const {
return addr.undefined() && port == 0;
return addr.undefined();
}
};

Expand Down