Patch 8.0.1101
Problem: Channel write fails if writing to log fails.
Solution: Ignore return value of fwrite(). (Ozaki Kiichi, closes #2081)
Files: src/channel.c
*** ../vim-8.0.1100/src/channel.c 2017-09-09 18:16:19.861806631 +0200
--- src/channel.c 2017-09-13 22:14:24.904173258 +0200
***************
*** 138,144 ****
}
static void
! ch_log_lead(char *what, channel_T *ch)
{
if (log_fd != NULL)
{
--- 138,144 ----
}
static void
! ch_log_lead(const char *what, channel_T *ch)
{
if (log_fd != NULL)
{
***************
*** 1813,1824 ****
head->rq_prev = node;
}
! if (log_fd != NULL && lead != NULL)
{
ch_log_lead(lead, channel);
fprintf(log_fd, "'");
! if (fwrite(buf, len, 1, log_fd) != 1)
! return FAIL;
fprintf(log_fd, "'\n");
}
return OK;
--- 1813,1823 ----
head->rq_prev = node;
}
! if (ch_log_active() && lead != NULL)
{
ch_log_lead(lead, channel);
fprintf(log_fd, "'");
! ignored = (int)fwrite(buf, len, 1, log_fd);
fprintf(log_fd, "'\n");
}
return OK;
***************
*** 3385,3391 ****
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}
! if (log_fd != NULL)
ch_log(channel, "Returning %d bytes", (int)STRLEN(msg));
return msg;
}
--- 3384,3390 ----
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}
! if (ch_log_active())
ch_log(channel, "Returning %d bytes", (int)STRLEN(msg));
return msg;
}
***************
*** 3670,3676 ****
return FAIL;
}
! if (log_fd != NULL)
{
ch_log_lead("SEND ", channel);
fprintf(log_fd, "'");
--- 3669,3675 ----
return FAIL;
}
! if (ch_log_active())
{
ch_log_lead("SEND ", channel);
fprintf(log_fd, "'");
*** ../vim-8.0.1100/src/version.c 2017-09-13 22:11:31.761200612 +0200
--- src/version.c 2017-09-13 22:16:33.027428906 +0200
***************
*** 771,772 ****
--- 771,774 ----
{ /* Add new patch number below this line */
+ /**/
+ 1101,
/**/
--
Two percent of zero is almost nothing.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.