fixed with version sync;

v0.5.xx
Alexander Vdolainen 9 years ago
parent e0644e7c5e
commit 84a71e6c3f

@ -147,7 +147,10 @@ static int __get_channels_list(void *cctx, sexp_t *sx)
co->rpc_list = ssys->get_rpc_typed_list_tree(co); co->rpc_list = ssys->get_rpc_typed_list_tree(co);
if(!co->rpc_list) return SXE_EPERM; if(!co->rpc_list) return SXE_EPERM;
//buf += sizeof(sxmplv2_head_t); //buf += sizeof(sxmplv2_head_t);
ulen += snprintf(buf + ulen, maxlen - ulen, "(set-channels-list "); if(co->cp_version == V2)
ulen += snprintf(buf + ulen, maxlen - ulen, "(set-channels-list ");
else ulen += snprintf(buf + ulen, maxlen - ulen, "(!@c< ");
for(node = usrtc_first(co->rpc_list); node != NULL; for(node = usrtc_first(co->rpc_list); node != NULL;
node = usrtc_next(co->rpc_list, node)) { /* fill the list */ node = usrtc_next(co->rpc_list, node)) { /* fill the list */
list_ent = (rpc_typed_list_t *)usrtc_node_getdata(node); list_ent = (rpc_typed_list_t *)usrtc_node_getdata(node);
@ -466,6 +469,8 @@ static int __init_systemrpc_tree(usrtc_t *rtree)
{ {
/* batch mode negotiation context functions */ /* batch mode negotiation context functions */
if(__insert_rpc_function(rtree, "auth-set-credentials", __set_credentials)) goto __fail; if(__insert_rpc_function(rtree, "auth-set-credentials", __set_credentials)) goto __fail;
/* old version V2 */
if(__insert_rpc_function(rtree, "get-channels-list", __get_channels_list)) goto __fail; /* old V2 (v1 also) */ if(__insert_rpc_function(rtree, "get-channels-list", __get_channels_list)) goto __fail; /* old V2 (v1 also) */
if(__insert_rpc_function(rtree, "set-channels-list", __set_channels_list)) goto __fail; if(__insert_rpc_function(rtree, "set-channels-list", __set_channels_list)) goto __fail;

Loading…
Cancel
Save