Github user laurentgo commented on a diff in the pull request:
https://github.com/apache/drill/pull/578#discussion_r85794422
--- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
@@ -102,18 +106,33 @@ connectionStatus_t DrillClientImpl::connect(const
char* connStr){
return handleConnError(CONN_ZOOKEEPER_ERROR,
getMessage(ERR_CONN_ZOOKEEPER, zook.getError().c_str()));
}
zook.close();
- m_bIsDirectConnection=true;
+ m_bIsDirectConnection=true;
}else if(!strcmp(protocol.c_str(), "local")){
boost::lock_guard<boost::mutex> lock(m_dcMutex);//strtok is
not reentrant
char tempStr[MAX_CONNECT_STR+1];
strncpy(tempStr, hostPortStr.c_str(), MAX_CONNECT_STR);
tempStr[MAX_CONNECT_STR]=0;
host=strtok(tempStr, ":");
port=strtok(NULL, "");
- m_bIsDirectConnection=false;
+ m_bIsDirectConnection=false;
}else{
return handleConnError(CONN_INVALID_INPUT,
getMessage(ERR_CONN_UNKPROTO, protocol.c_str()));
}
DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Connecting to endpoint: " <<
host << ":" << port << std::endl;)
+ std::string servicename = NULL;
--- End diff --
servicename is a value, not a pointer. If you don't want to set a value,
simply remove the assignment part (otherwise, it's like calling
std::string(NULL))
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---