~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.cc

Further drizzleclient cleanup. Starting to move all NET related functions into Protocol, removed some dead code, removing drizzleclient dependencies spread throughout drizzled.

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
 
275
275
  /* The first # is to make the protocol backward compatible */
276
276
  buff[2]= '#';
277
 
  pos= (unsigned char*) strcpy((char*) buff+3, drizzleclient_errno_to_sqlstate(sql_errno));
278
 
  pos+= strlen(drizzleclient_errno_to_sqlstate(sql_errno));
 
277
  pos= (unsigned char*) strcpy((char*) buff+3, drizzle_errno_to_sqlstate(sql_errno));
 
278
  pos+= strlen(drizzle_errno_to_sqlstate(sql_errno));
279
279
 
280
280
  char *tmp= strncpy((char*)pos, err, DRIZZLE_ERRMSG_SIZE-1);
281
281
  tmp+= strlen((char*)pos);
645
645
  All data are sent as 'packed-string-length' followed by 'string-data'
646
646
****************************************************************************/
647
647
 
 
648
bool Protocol_text::init_file_descriptor(int fd)
 
649
{
 
650
  if (drizzleclient_net_init_sock(&session->net, fd, 0))
 
651
    return true;
 
652
  return false;
 
653
}
 
654
 
648
655
void Protocol_text::prepare_for_resend()
649
656
{
650
657
  packet->length(0);