~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/conn_uds.cc

  • Committer: Mark Atwood
  • Date: 2011-12-22 04:39:00 UTC
  • mfrom: (2472.1.2 drizzle-build)
  • Revision ID: me@mark.atwood.name-20111222043900-utca466m80z3gj61
mergeĀ lp:~brianaker/drizzle/null-safety-fix-libdrizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
const char *drizzle_con_uds(const drizzle_con_st *con)
46
46
{
 
47
  if (con == NULL)
 
48
  {
 
49
    return NULL;
 
50
  }
 
51
 
47
52
  if (con->socket_type == DRIZZLE_CON_SOCKET_UDS)
48
53
  {
49
54
    if (con->socket.uds.sockaddr.sun_path[0] != 0)
60
65
 
61
66
void drizzle_con_set_uds(drizzle_con_st *con, const char *uds)
62
67
{
 
68
  if (con == NULL)
 
69
  {
 
70
    return;
 
71
  }
 
72
 
63
73
  drizzle_con_reset_addrinfo(con);
64
74
 
65
75
  con->socket_type= DRIZZLE_CON_SOCKET_UDS;
66
76
 
67
77
  if (uds == NULL)
 
78
  {
68
79
    uds= "";
 
80
  }
69
81
 
70
82
  con->socket.uds.sockaddr.sun_family= AF_UNIX;
71
83
  strncpy(con->socket.uds.sockaddr.sun_path, uds,