diff options
Diffstat (limited to 'ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c')
-rw-r--r-- | ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c index 6c4f938ce..08551b470 100644 --- a/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c +++ b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -14,20 +14,17 @@ */ #include "hicn_light_comm.h" -hc_sock_t * hsocket; +hc_sock_t* hsocket; int hicn_connect_light() { - - hsocket = hc_sock_create(); - if (!hsocket) - HICN_LOG_ERR_MSG("Error creating socket\n"); - if (hc_sock_connect(hsocket) < 0) - HICN_LOG_ERR_MSG("Error connecting to the forwarder\n"); - return 0; - + hsocket = hc_sock_create(); + if (!hsocket) HICN_LOG_ERR_MSG("Error creating socket\n"); + if (hc_sock_connect(hsocket) < 0) + HICN_LOG_ERR_MSG("Error connecting to the forwarder\n"); + return 0; } int hicn_disconnect_light() { - hc_sock_free(hsocket); + hc_sock_free(hsocket); return 0; }
\ No newline at end of file |