comparison src/channel.c @ 8009:b2cfa3416ba0 v7.4.1299

commit https://github.com/vim/vim/commit/f6157284de71d8881f3b89fbd79d1ecbf842929f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 10 21:07:14 2016 +0100 patch 7.4.1299 Problem: When the server sends a message with ID zero the channel handler is not invoked. (Christian J. Robinson) Solution: Recognize zero value for the request ID. Add a test for invoking the channel handler.
author Christian Brabandt <cb@256bit.org>
date Wed, 10 Feb 2016 21:15:04 +0100
parents c1c9ab17e197
children ece323e2b57f
comparison
equal deleted inserted replaced
8008:3adaa0992538 8009:b2cfa3416ba0
784 list_T *l = item->value->vval.v_list; 784 list_T *l = item->value->vval.v_list;
785 typval_T *tv = &l->lv_first->li_tv; 785 typval_T *tv = &l->lv_first->li_tv;
786 786
787 if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id) 787 if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
788 || (id <= 0 && (tv->v_type != VAR_NUMBER 788 || (id <= 0 && (tv->v_type != VAR_NUMBER
789 || tv->vval.v_number == 0
789 || tv->vval.v_number != channel->ch_block_id))) 790 || tv->vval.v_number != channel->ch_block_id)))
790 { 791 {
791 *rettv = item->value; 792 *rettv = item->value;
792 remove_json_node(item); 793 remove_json_node(item);
793 return OK; 794 return OK;