Fix parse warnings
[platform/core/telephony/tel-plugin-indicator.git] / src / s_indi_log.c
1 /*
2  * tel-plugin-indicator
3  *
4  * Copyright (c) 2014 Samsung Electronics Co. Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <glib.h>
20
21 #include "s_indi_log.h"
22
23 #ifdef TCORE_LOG_TAG
24 #define LOG_TAG TCORE_LOG_TAG
25 #else
26 #define LOG_TAG "S_INDI"
27 #endif
28
29 const char *log_tag_name[MODEM_ID_LAST + 1] = {
30         [MODEM_ID_PRIMARY] = LOG_TAG"/SUBS-0",
31         [MODEM_ID_SECONDARY] = LOG_TAG"/SUBS-1"
32 };
33
34 const char *s_indi_get_log_tag_with_id(unsigned int modem_id)
35 {
36         g_assert(modem_id <= MODEM_ID_SECONDARY);
37         return log_tag_name[modem_id];
38 }
39
40 gchar *s_indi_get_log_tag_with_cp_name(const char *cp_name)
41 {
42         return g_strdup_printf("%s/%s", LOG_TAG, cp_name);
43 }