~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/libdrizzle/pack.cc

  • Committer: Marc Isambart
  • Date: 2011-04-08 08:15:05 UTC
  • mto: This revision was merged to the branch mainline in revision 2302.
  • Revision ID: marc_isambart-20110408081505-a59ued2gti2kred8
Various libdrizzle Windows fixes, including closesocket() instead of close(), snprintf handling and WSAECONNREFUSED mapping

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
    if (con->options & DRIZZLE_CON_MYSQL && con->options & DRIZZLE_CON_AUTH_PLUGIN)
230
230
    {
231
231
      snprintf((char *)ptr, DRIZZLE_MAX_SCRAMBLE_SIZE, "%s", con->password);
 
232
      ptr[DRIZZLE_MAX_SCRAMBLE_SIZE-1]= 0;
232
233
    }
233
234
    else if (con->options & DRIZZLE_CON_MYSQL)
234
235
    {
239
240
    else // We assume Drizzle
240
241
    {
241
242
      snprintf((char *)ptr, DRIZZLE_MAX_SCRAMBLE_SIZE, "%s", con->password);
 
243
      ptr[DRIZZLE_MAX_SCRAMBLE_SIZE-1]= 0;
242
244
    }
243
245
 
244
246
    ptr+= DRIZZLE_MAX_SCRAMBLE_SIZE;