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

« back to all changes in this revision

Viewing changes to lib/logreader.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:
242
242
                evt_tag_int("size", st.st_size),
243
243
                NULL);
244
244
 
245
 
      if (pos < st.st_size)
 
245
      if (pos < st.st_size || !S_ISREG(st.st_mode))
246
246
        {
247
247
          /* we have data to read */
248
248
          log_reader_io_process_input(s);
337
337
      /* NOTE: the fd may not be set here, as it may not have been opened yet */
338
338
      iv_timer_register(&self->follow_timer);
339
339
    }
340
 
  else if (fd < 0)
341
 
    {
342
 
      msg_error("In order to poll non-yet-existing files, follow_freq() must be set",
343
 
                NULL);
344
 
      return FALSE;
345
 
    }
346
340
  else
347
341
    {
 
342
      if (fd < 0)
 
343
        {
 
344
          msg_error("In order to poll non-yet-existing files, follow_freq() must be set",
 
345
                    NULL);
 
346
          return FALSE;
 
347
        }
 
348
 
348
349
      /* we have an FD, it is possible to poll it, register it  */
349
350
      self->fd_watch.fd = fd;
350
351
      if (self->pollable_state < 0)
351
352
        {
352
 
          if (iv_fd_register_try(&self->fd_watch) == 0)
353
 
            self->pollable_state = 1;
354
 
          else
355
 
            self->pollable_state = 0;
 
353
          self->pollable_state = !iv_fd_register_try(&self->fd_watch);
356
354
        }
357
355
      else if (self->pollable_state > 0)
358
356
        {
359
357
          iv_fd_register(&self->fd_watch);
360
358
        }
361
 
      else
 
359
 
 
360
      if (self->pollable_state == 0)
362
361
        {
363
362
          msg_error("Unable to determine how to monitor this fd, follow_freq() not set and it is not possible to poll it with the current ivykis polling method, try changing IV_EXCLUDE_POLL_METHOD environment variable",
364
363
                    evt_tag_int("fd", fd),