From b38a8d1631cf7fc8eec6d1e88b60d5db340ee376 Mon Sep 17 00:00:00 2001 From: Vo Trung Chi Date: Thu, 14 Nov 2019 14:10:23 +0700 Subject: Provide DLT_GET_APPID macro (#187) (#188) Signed-off-by: Christoph Lipka --- src/lib/dlt_user.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib') diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 8031b66..c3da424 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -414,6 +414,17 @@ DltReturnValue dlt_init(void) return DLT_RETURN_OK; } +DltReturnValue dlt_get_appid(char *appid) +{ + if (appid != NULL) { + strncpy(appid, dlt_user.appID, 4); + return DLT_RETURN_OK; + } else { + dlt_log(LOG_ERR, "Invalid parameter.\n"); + return DLT_RETURN_WRONG_PARAMETER; + } +} + DltReturnValue dlt_init_file(const char *name) { /* check null pointer */ -- cgit v1.2.1