~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/scheduler.cc

  • Committer: Monty Taylor
  • Date: 2008-09-15 00:46:33 UTC
  • mfrom: (383.1.55 client-split)
  • Revision ID: monty@inaugust.com-20080915004633-fmjw27fi41cxs35w
Merged from client-split.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
*/
19
19
 
20
20
#include <drizzled/server_includes.h>
21
 
#include <vio/violite.h>
 
21
#include <libdrizzle/libdrizzle.h>
22
22
#include "event.h"
23
23
 
24
24
 
123
123
    return true;
124
124
  }
125
125
  
126
 
  event_set(io_event, parent_thd->net.vio->sd, EV_READ, 
 
126
  event_set(io_event, net_get_sd(&(parent_thd->net)), EV_READ, 
127
127
            libevent_io_callback, (void*)parent_thd);
128
128
    
129
129
  list.data= parent_thd;
430
430
{
431
431
  thd->killed= THD::KILL_CONNECTION;          // Avoid error messages
432
432
 
433
 
  if (thd->net.vio->sd >= 0)                  // not already closed
 
433
  if (net_get_sd(&(thd->net)) >= 0)                  // not already closed
434
434
  {
435
435
    end_connection(thd);
436
436
    close_connection(thd, 0, 1);
449
449
 
450
450
static bool libevent_should_close_connection(THD* thd)
451
451
{
452
 
  return thd->net.error ||
453
 
         thd->net.vio == 0 ||
 
452
  return net_should_close(&(thd->net)) ||
454
453
         thd->killed == THD::KILL_CONNECTION;
455
454
}
456
455
 
573
572
    Note: we cannot add for event processing because the whole request might
574
573
    already be buffered and we wouldn't receive an event.
575
574
  */
576
 
  if (thd->net.vio == 0 || thd->net.vio->read_pos < thd->net.vio->read_end)
 
575
  if (net_more_data(&(thd->net)))
577
576
    return true;
578
577
  
579
578
  thd->scheduler.thread_detach();