From 2bfd3335ff11281d703cb7f422bb17da2d3a6bcd Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Mon, 2 Dec 2019 14:28:22 +0100 Subject: to fix HICN-421 by adding cpack to libyang and sysrepo Signed-off-by: Luca Muscariello Change-Id: Ia9e0752f877c7fc0be6df85664d18e1caad86741 Signed-off-by: Alberto Compagno --- ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c') diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c index 305512af3..8db0a6238 100644 --- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c +++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c @@ -296,7 +296,7 @@ vapi_error_e call_hicn_api_node_params_set(struct vapi_ctx_s *ctx, } static inline void state_update(sr_val_t * vals, struct lyd_node **parent, sr_session_ctx_t *session){ - char buf[20]; + char buf[20]; //struct ly_ctx *ly_ctx = sr_get_context(sr_session_get_connection(session)); sr_val_set_xpath(&vals[0], "/hicn:hicn-state/states/pkts_processed"); vals[0].type = SR_UINT64_T; @@ -420,12 +420,12 @@ static inline int routes_update(sr_val_t * vals, uint32_t nleaves, struct lyd_n memset(buf, 0x00, 20); if (temp->route.prefix.address.af==ADDRESS_IP4){ struct sockaddr_in sa; - memcpy(&sa.sin_addr.s_addr,temp->route.prefix.address.un.ip4,INET_ADDRSTRLEN); + memcpy(&sa.sin_addr.s_addr, temp->route.prefix.address.un.ip4, IPV4_ADDR_LEN); inet_ntop(AF_INET, &(sa.sin_addr), buf, INET_ADDRSTRLEN); vals[route].data.string_val = buf; }else{ struct sockaddr_in6 sa; - memcpy(&sa.sin6_addr,temp->route.prefix.address.un.ip6,INET6_ADDRSTRLEN); + memcpy(&sa.sin6_addr,temp->route.prefix.address.un.ip6, IPV6_ADDR_LEN); inet_ntop(AF_INET6, &(sa.sin6_addr), buf, INET6_ADDRSTRLEN); vals[route].data.string_val = buf; } @@ -443,7 +443,7 @@ static inline int routes_update(sr_val_t * vals, uint32_t nleaves, struct lyd_n memset(buf, 0x00, 20); sprintf( buf, "%d", temp->route.strategy_id); lyd_new_path(*parent, NULL, vals[route].xpath, buf, 0, 0); - + route++; temp=temp->next; -- cgit 1.2.3-korg