Commit 20e8d38b authored by unknown's avatar unknown
Browse files

Jammed Qmgr a bit more

Fixed Bug #4935, initialise before connecting again
Some lines removed

parent a2b6166e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2585,7 +2585,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
  Uint32 id1= 0, id2= 0;
  require(ctx.m_currentSection->get("NodeId1", &id1));
  require(ctx.m_currentSection->get("NodeId2", &id2));

  id1 = id1 < id2 ? id1 : id2;

  const Properties * node;
@@ -2618,7 +2617,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
      }
      ctx.m_userProperties.put("ServerPortBase", base);
    }

    port= base + adder;
    ctx.m_userProperties.put("ServerPort_", id1, port);
  }
+0 −1
Original line number Diff line number Diff line
@@ -445,7 +445,6 @@ IPCConfig::configureTransporters(Uint32 nodeId,
      if(iter.get(CFG_TCP_RECEIVE_BUFFER_SIZE, &conf.maxReceiveSize)) break;
      
      conf.port= tmp_server_port;

      const char * proxy;
      if (!iter.get(CFG_TCP_PROXY, &proxy)) {
	if (strlen(proxy) > 0 && nodeId2 == nodeId) {
+0 −3
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ bool
Transporter::connect_client() {
  if(m_connected)
    return true;
  
  NDB_SOCKET_TYPE sockfd = m_socket_client->connect();
  
  if (sockfd < 0)
@@ -102,7 +101,6 @@ Transporter::connect_client() {
  // send info about own id 
  SocketOutputStream s_output(sockfd);
  s_output.println("%d", localNodeId);

  // get remote id
  int nodeId;
  SocketInputStream s_input(sockfd);
@@ -115,7 +113,6 @@ Transporter::connect_client() {
    NDB_CLOSE_SOCKET(sockfd);
    return false;
  }

  bool res = connect_client_impl(sockfd);
  if(res){
    m_connected  = true;
+1 −2
Original line number Diff line number Diff line
@@ -201,7 +201,6 @@ TransporterRegistry::createTransporter(TCP_TransporterConfiguration *config) {
  if(theTransporters[config->remoteNodeId] != NULL)
    return false;
   

  TCP_Transporter * t = new TCP_Transporter(*this,
					    config->sendBufferSize,
					    config->maxReceiveSize,
+6 −4
Original line number Diff line number Diff line
@@ -70,19 +70,21 @@ SocketClient::connect()
      return -1;
    }
  }

  const int r = ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
  if (r == -1)
  if (r == -1) {
    NDB_CLOSE_SOCKET(m_sockfd);
    m_sockfd= -1;
    return -1;
  }

  if (m_auth)
  if (m_auth) {
    if (!m_auth->client_authenticate(m_sockfd))
    {
      NDB_CLOSE_SOCKET(m_sockfd);
      m_sockfd= -1;
      return -1;
    }

  }
  NDB_SOCKET_TYPE sockfd= m_sockfd;
  m_sockfd= -1;

Loading