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