core: added type_id to the channel struct;

v0.5.xx
Alexander Vdolainen 9 years ago
parent 1cb8d3ad15
commit ab242783d8

@ -127,6 +127,7 @@ typedef struct __sxchannel_t {
sxlink_t *link; /** < pointer to the underlying link */
struct __link_rpc_list_type *rpc_list; /** < rpc functions list */
int flags; /** < flags of the channel */
int type_id; /** < channel type id */
} sxchnl_t;
/* message flags */

@ -79,6 +79,7 @@ uint8_t _channel_open(sxlink_t *co, uint16_t *chid)
chan->link = co;
chan->rpc_list = rpclist;
chan->flags = 0;
chan->type_id = typeid;
pthread_mutex_lock(&co->idx_ch_lock);
chidx = idx_allocate(&co->idx_ch);
@ -172,6 +173,7 @@ sxchnl_t *sxchannel_open(sxlink_t *co, int type)
/* ok all is fine */
chan->cid = msg->mhead.reserve;
chan->type_id = type;
ccid = chan->cid;
pthread_mutex_lock(&co->idx_ch_lock);
idx_reserve(&co->idx_ch, ccid);

Loading…
Cancel
Save