~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/net_serv.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-23 10:31:37 UTC
  • mto: (2247.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2248.
  • Revision ID: olafvdspek@gmail.com-20110323103137-lwevis2tfchgu18u
Propogate return void

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"
 
21
#include <config.h>
 
22
 
 
23
#include <drizzled/current_session.h>
 
24
#include <drizzled/error.h>
22
25
#include <drizzled/session.h>
23
 
#include <drizzled/error.h>
 
26
#include <drizzled/statistics_variables.h>
 
27
#include <drizzled/system_variables.h>
24
28
 
25
29
#include <assert.h>
26
30
#include <stdio.h>
95
99
{
96
100
  Vio *vio_tmp= new Vio(sock);
97
101
  if (vio_tmp == NULL)
 
102
  {
98
103
    return true;
 
104
  }
99
105
  else
100
106
    if (drizzleclient_net_init(net, vio_tmp, buffer_length))
101
107
    {
103
109
       * NET object.
104
110
       */
105
111
      if (vio_tmp && (net->vio != vio_tmp))
 
112
      {
106
113
        delete vio_tmp;
 
114
      }
107
115
      else
108
116
      {
109
117
        (void) shutdown(sock, SHUT_RDWR);
124
132
 
125
133
void drizzleclient_net_close(NET *net)
126
134
{
127
 
  if (net->vio != NULL)
128
 
  {
129
 
    delete net->vio;
130
 
    net->vio= 0;
131
 
  }
 
135
  drizzled::safe_delete(net->vio);
132
136
}
133
137
 
134
138
bool drizzleclient_net_peer_addr(NET *net, char *buf, uint16_t *port, size_t buflen)
579
583
      break;
580
584
    }
581
585
    pos+=length;
582
 
    current_session->status_var.bytes_sent+= length;
 
586
 
 
587
    /* If this is an error we may not have a current_session any more */
 
588
    if (current_session)
 
589
      current_session->status_var.bytes_sent+= length;
583
590
  }
584
591
end:
585
592
  if ((net->compress) && (packet != NULL))
852
859
        }
853
860
      }
854
861
      else
 
862
      {
855
863
        complen= packet_len;
 
864
      }
856
865
 
857
866
    }
858
867
    buf_length+= complen;