~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/errmsg_stderr/errmsg_stderr.cc

  • Committer: Patrick Crews
  • Date: 2010-12-07 20:02:50 UTC
  • Revision ID: gleebix@gmail.com-20101207200250-6a27jgqalgw5bsb5
Added disabled.def file to disable drizzleslap due to Bug#684269.  Need to skip for tarball release this round

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
public:
37
37
  Error_message_stderr()
38
38
   : plugin::ErrorMessage("Error_message_stderr") {}
39
 
  virtual bool errmsg(error::level_t , const char *format, va_list ap)
 
39
  virtual bool errmsg(Session *, int , const char *format, va_list ap)
40
40
  {
41
41
    char msgbuf[MAX_MSG_LEN];
42
42
    int prv, wrv;
47
47
    /* a single write has a OS level thread lock
48
48
       so there is no need to have mutexes guarding this write,
49
49
    */
50
 
    wrv= write(fileno(stderr), msgbuf, prv);
51
 
    fputc('\n', stderr);
52
 
    if ((wrv < 0) || (wrv != prv))
53
 
      return true;
 
50
    wrv= write(2, msgbuf, prv);
 
51
    if ((wrv < 0) || (wrv != prv)) return true;
54
52
 
55
53
    return false;
56
54
  }
74
72
  N_("Error Messages to stderr"),
75
73
  PLUGIN_LICENSE_GPL,
76
74
  errmsg_stderr_plugin_init,
77
 
  NULL, /* depends */
 
75
  NULL, /* system variables */
78
76
  NULL
79
77
}
80
78
DRIZZLE_DECLARE_PLUGIN_END;