~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-3

« back to all changes in this revision

Viewing changes to libdrizzle/conn.c

  • Committer: Andrew Hutchings
  • Date: 2012-12-08 19:39:11 UTC
  • Revision ID: andrew@linuxjedi.co.uk-20121208193911-44w0fo2bd6h1or8h
More docs and more server-side functions stripped

Show diffs side-by-side

added added

removed removed

Lines of Context:
338
338
 
339
339
  if (con->socket_type == DRIZZLE_CON_SOCKET_TCP)
340
340
  {
341
 
    if (con->socket.tcp.host == NULL && !(con->options & DRIZZLE_CON_LISTEN))
 
341
    if (con->socket.tcp.host == NULL)
342
342
      return DRIZZLE_DEFAULT_TCP_HOST;
343
343
 
344
344
    return con->socket.tcp.host;
842
842
    ai.ai_flags = AI_PASSIVE;
843
843
    ai.ai_family = AF_UNSPEC;
844
844
 
845
 
    if (con->options & DRIZZLE_CON_LISTEN)
 
845
    if (tcp->host == NULL)
 
846
    {
 
847
      host= DRIZZLE_DEFAULT_TCP_HOST;
 
848
    }
 
849
    else
846
850
    {
847
851
      host= tcp->host;
848
852
    }
849
 
    else
850
 
    {
851
 
      if (tcp->host == NULL)
852
 
      {
853
 
        host= DRIZZLE_DEFAULT_TCP_HOST;
854
 
      }
855
 
      else
856
 
      {
857
 
        host= tcp->host;
858
 
      }
859
 
    }
860
853
 
861
854
    ret= getaddrinfo(host, port, &ai, &(tcp->addrinfo));
862
855
    if (ret != 0)