~ubuntu-branches/ubuntu/trusty/syslog-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/logwriter.c

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2013-05-26 09:06:21 UTC
  • mfrom: (1.3.11)
  • Revision ID: package-import@ubuntu.com-20130526090621-8z2s0oi21eoljb9x
Tags: 3.3.9-1
* New upstream release.
* Include missed ivykis header (closes: #708793).

Show diffs side-by-side

added added

removed removed

Lines of Context:
414
414
  gint fd;
415
415
  GIOCondition cond;
416
416
 
417
 
  if (!self->watches_running)
 
417
  if (self->watches_running)
 
418
    return;
 
419
 
 
420
  log_proto_prepare(self->proto, &fd, &cond);
 
421
 
 
422
  self->fd_watch.fd = fd;
 
423
 
 
424
  if (self->pollable_state < 0)
418
425
    {
419
 
      log_proto_prepare(self->proto, &fd, &cond);
420
 
 
421
 
      self->fd_watch.fd = fd;
422
 
 
423
 
      if (self->pollable_state < 0)
424
 
        {
425
 
          /* auto-detect if the fd can be polled using ivykis */
426
 
          if (is_file_regular(fd))
427
 
            self->pollable_state = 0;
428
 
          else if (iv_fd_register_try(&self->fd_watch) == 0)
429
 
            self->pollable_state = 1;
430
 
          else
431
 
            self->pollable_state = 0;
432
 
        }
433
 
      else if (self->pollable_state > 0)
434
 
        iv_fd_register(&self->fd_watch);
435
 
 
436
 
      log_writer_update_watches(self);
437
 
      self->watches_running = TRUE;
 
426
      if (is_file_regular(fd))
 
427
        self->pollable_state = 0;
 
428
      else
 
429
        self->pollable_state = !iv_fd_register_try(&self->fd_watch);
438
430
    }
 
431
  else if (self->pollable_state > 0)
 
432
    iv_fd_register(&self->fd_watch);
 
433
 
 
434
  log_writer_update_watches(self);
 
435
  self->watches_running = TRUE;
439
436
}
440
437
 
441
438
static void