Mercurial > vim
comparison src/channel.c @ 9089:6bc0a492e8ba v7.4.1829
commit https://github.com/vim/vim/commit/de7eb0a47b557eb4656c6b63d421c7e7bae1ef30
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 9 20:54:33 2016 +0200
patch 7.4.1829
Problem: No message on channel log when buffer was freed.
Solution: Log a message.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 09 May 2016 21:00:05 +0200 |
parents | d4606ae170aa |
children | b430d4f2aa79 |
comparison
equal
deleted
inserted
replaced
9088:123e39cec289 | 9089:6bc0a492e8ba |
---|---|
61 | 61 |
62 /* Whether we are inside channel_parse_messages() or another situation where it | 62 /* Whether we are inside channel_parse_messages() or another situation where it |
63 * is safe to invoke callbacks. */ | 63 * is safe to invoke callbacks. */ |
64 static int safe_to_invoke_callback = 0; | 64 static int safe_to_invoke_callback = 0; |
65 | 65 |
66 static char *part_names[] = {"sock", "out", "err", "in"}; | |
67 | |
66 #ifdef WIN32 | 68 #ifdef WIN32 |
67 static int | 69 static int |
68 fd_read(sock_T fd, char *buf, size_t len) | 70 fd_read(sock_T fd, char *buf, size_t len) |
69 { | 71 { |
70 HANDLE h = (HANDLE)fd; | 72 HANDLE h = (HANDLE)fd; |
1420 for (part = PART_SOCK; part <= PART_IN; ++part) | 1422 for (part = PART_SOCK; part <= PART_IN; ++part) |
1421 { | 1423 { |
1422 chanpart_T *ch_part = &channel->ch_part[part]; | 1424 chanpart_T *ch_part = &channel->ch_part[part]; |
1423 | 1425 |
1424 if (ch_part->ch_buffer == buf) | 1426 if (ch_part->ch_buffer == buf) |
1427 { | |
1428 ch_logs(channel, "%s buffer has been wiped out", | |
1429 part_names[part]); | |
1425 ch_part->ch_buffer = NULL; | 1430 ch_part->ch_buffer = NULL; |
1431 } | |
1426 } | 1432 } |
1427 } | 1433 } |
1428 | 1434 |
1429 /* | 1435 /* |
1430 * Write any lines waiting to be written to a channel. | 1436 * Write any lines waiting to be written to a channel. |