SWIG/oc_core_res: Fix lifetime of add_device_cb
@@ -116,7 +116,7 @@ void jni_oc_core_add_device_callback(void *user_data)
jni_callback_data *user_data = (jni_callback_data *)malloc(sizeof *user_data);
user_data->jenv = jenv;
user_data->jcb_obj = JCALL1(NewGlobalRef, jenv, $input);
- user_data->cb_valid = OC_CALLBACK_VALID_FOR_A_SINGLE_CALL;
+ user_data->cb_valid = OC_CALLBACK_VALID_TILL_SHUTDOWN;
jni_list_add(user_data);
$1 = jni_oc_core_add_device_callback;
$2 = user_data;
