From aac4a3d3163ee4085fc00426cf31fe3143dd191e Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Mon, 25 Nov 2019 11:20:32 +0100 Subject: [HICN-408] add a face manager interface for face priority control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I07cd4c100251c42ef32117a515e8e9e39b9c3031 Signed-off-by: Jordan Augé --- .../priority_controller/priority_controller.c | 24 ++++++++++++++++++++-- ctrl/libhicnctrl/src/api.c | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'ctrl') diff --git a/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c b/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c index b8e7271bb..a64796857 100644 --- a/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c +++ b/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c @@ -1,3 +1,23 @@ +/* + * Copyright (c) 2017-2019 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: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * \file priority_controller.c + * \brief Implementation of Priority Controller interface + */ + #include #include #include @@ -112,10 +132,10 @@ int priority_controller_callback(interface_t * interface, int fd, void * unused) INFO("Priority controller configuring both Cellular and Wi-Fi preferred"); break; default: - INFO("Priority cntroller invalid data received from updown server. Ignoring..."); + INFO("Priority controller invalid data received from updown server. Ignoring..."); facelet_free(facelet_w); facelet_free(facelet_c); - return -1; + return 0; } facelet_set_event(facelet_w, FACELET_EVENT_UPDATE); diff --git a/ctrl/libhicnctrl/src/api.c b/ctrl/libhicnctrl/src/api.c index e7caf4f1c..ea4ed69c2 100644 --- a/ctrl/libhicnctrl/src/api.c +++ b/ctrl/libhicnctrl/src/api.c @@ -2268,7 +2268,7 @@ hc_face_get(hc_sock_t * s, hc_face_t * face, hc_face_t ** face_found) int rc = hc_face_snprintf(face_s, MAXSZ_HC_FACE, face); if (rc >= MAXSZ_HC_FACE) WARN("[hc_face_get] Unexpected truncation of face string"); - DEBUG("[hc_face_get] face=%s"); + DEBUG("[hc_face_get] face=%s", face_s); switch(face->face.type) { -- cgit 1.2.3-korg