~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/client.c

  • Committer: Mark Atwood
  • Date: 2008-12-29 22:12:25 UTC
  • mfrom: (752 testable)
  • mto: (754.1.4 devel)
  • mto: This revision was merged to the branch mainline in revision 755.
  • Revision ID: me@mark.atwood.name-20081229221225-u2hiic4ztb2mryfn
mergeĀ fromĀ main

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
  Read a packet from server. Give error message if socket was down
100
100
  or packet is an error message
101
101
*****************************************************************************/
 
102
safe_read_error_hook_func safe_read_error_hook= NULL;
102
103
 
103
104
uint32_t cli_safe_read(DRIZZLE *drizzle)
104
105
{
110
111
 
111
112
  if (len == packet_error || len == 0)
112
113
  {
113
 
#ifdef DRIZZLE_SERVER
114
 
    if (net->vio && vio_was_interrupted(net->vio))
115
 
      return (packet_error);
116
 
#endif /*DRIZZLE_SERVER*/
 
114
    if (safe_read_error_hook != NULL)
 
115
      if (safe_read_error_hook(net))
 
116
        return (packet_error);
117
117
    drizzle_disconnect(drizzle);
118
118
    drizzle_set_error(drizzle, net->last_errno == CR_NET_PACKET_TOO_LARGE ?
119
119
                      CR_NET_PACKET_TOO_LARGE : CR_SERVER_LOST,