~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/net_serv.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
22
 
 
23
 
#include <drizzled/current_session.h>
 
21
#include "config.h"
 
22
#include <drizzled/session.h>
24
23
#include <drizzled/error.h>
25
 
#include <drizzled/session.h>
26
 
#include <drizzled/statistics_variables.h>
27
 
#include <drizzled/system_variables.h>
28
24
 
29
25
#include <assert.h>
30
26
#include <stdio.h>
99
95
{
100
96
  Vio *vio_tmp= new Vio(sock);
101
97
  if (vio_tmp == NULL)
102
 
  {
103
98
    return true;
104
 
  }
105
99
  else
106
100
    if (drizzleclient_net_init(net, vio_tmp, buffer_length))
107
101
    {
109
103
       * NET object.
110
104
       */
111
105
      if (vio_tmp && (net->vio != vio_tmp))
112
 
      {
113
106
        delete vio_tmp;
114
 
      }
115
107
      else
116
108
      {
117
109
        (void) shutdown(sock, SHUT_RDWR);
132
124
 
133
125
void drizzleclient_net_close(NET *net)
134
126
{
135
 
  drizzled::safe_delete(net->vio);
 
127
  if (net->vio != NULL)
 
128
  {
 
129
    delete net->vio;
 
130
    net->vio= 0;
 
131
  }
136
132
}
137
133
 
138
134
bool drizzleclient_net_peer_addr(NET *net, char *buf, uint16_t *port, size_t buflen)
859
855
        }
860
856
      }
861
857
      else
862
 
      {
863
858
        complen= packet_len;
864
 
      }
865
859
 
866
860
    }
867
861
    buf_length+= complen;