From a0d4a1a6d1b81b132787e382ac3f8487b71cf52c Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Sat, 12 Dec 2015 14:40:59 +0100 Subject: new version handling Change-Id: I90983f3df94a3b28199908b29ffd8f827ab0c379 Signed-off-by: Damjan Marion --- vpp-japi/japi/vppjni.c | 10 +++++----- vpp-japi/japi/vppjni.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'vpp-japi/japi') diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c index 65c26403..740a3425 100644 --- a/vpp-japi/japi/vppjni.c +++ b/vpp-japi/japi/vppjni.c @@ -153,11 +153,11 @@ JNIEXPORT jobject JNICALL Java_org_openvpp_vppjapi_vppConn_getVppVersion vppjni_lock (jm, 11); jstring progName = (*env)->NewStringUTF(env, (char *)jm->program_name); jstring buildDir = (*env)->NewStringUTF(env, (char *)jm->build_directory); - jstring gitBranch = (*env)->NewStringUTF(env, (char *)jm->git_branch); + jstring version = (*env)->NewStringUTF(env, (char *)jm->version); jstring buildDate = (*env)->NewStringUTF(env, (char *)jm->build_date); vppjni_unlock (jm); - return (*env)->NewObject(env, cls, constr, progName, buildDir, gitBranch, buildDate); + return (*env)->NewObject(env, cls, constr, progName, buildDir, version, buildDate); } static int jm_show_version (vppjni_main_t *jm) @@ -1349,9 +1349,9 @@ vl_api_show_version_reply_t_handler (vl_api_show_version_reply_t * mp) sizeof(jm->build_directory)-1); jm->build_directory[sizeof(jm->build_directory)-1] = 0; - strncpy((char*)jm->git_branch, (const char*)mp->git_branch, - sizeof(jm->git_branch)-1); - jm->git_branch[sizeof(jm->git_branch)-1] = 0; + strncpy((char*)jm->version, (const char*)mp->version, + sizeof(jm->version)-1); + jm->version[sizeof(jm->version)-1] = 0; strncpy((char*)jm->build_date, (const char*)mp->build_date, sizeof(jm->build_date)-1); diff --git a/vpp-japi/japi/vppjni.h b/vpp-japi/japi/vppjni.h index d2054b77..c065016c 100644 --- a/vpp-japi/japi/vppjni.h +++ b/vpp-japi/japi/vppjni.h @@ -156,10 +156,10 @@ typedef struct { u8 collect_indices; u32 * sw_if_dump_if_indices; - /* program name, build_dir, git_version */ + /* program name, build_dir, version */ u8 program_name[32]; u8 build_directory[256]; - u8 git_branch[32]; + u8 version[32]; u8 build_date[32]; /* subinterface table */ -- cgit 1.2.3-korg