Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

update sentry-native to 0.2.2 #305

Merged
merged 6 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sentry-android-ndk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ android {

externalNativeBuild {
cmake {
setVersion("3.10.2")
setPath("CMakeLists.txt")
}
}
Expand Down
2 changes: 1 addition & 1 deletion sentry-android-ndk/sentry-native
Submodule sentry-native updated 160 files
13 changes: 11 additions & 2 deletions sentry-android-ndk/src/main/jni/sentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ struct transport_options {

struct transport_options g_transport_options;

static void send_envelope(sentry_envelope_t *envelope, void *data) {
static void send_envelope(sentry_envelope_t *envelope, void *unused_data) {
(void)unused_data;
char envelope_id_str[40];
char outbox_path[4096];

Expand Down Expand Up @@ -44,7 +45,15 @@ JNIEXPORT void JNICALL Java_io_sentry_android_ndk_SentryNdk_initSentryNative(JNI

sentry_options_t *options = sentry_options_new();

sentry_options_set_database_path(options, g_transport_options.outbox_path);
// give sentry-native its own database path it can work with, next to the outbox
char database_path[4096];
strncpy(database_path, g_transport_options.outbox_path, 4096);
char *dir = strrchr(database_path, '/');
if (dir) {
strncpy(dir + 1, ".sentry-native", 4096 - (dir + 1 - database_path));
}
sentry_options_set_database_path(options, database_path);

sentry_options_set_transport(
options, sentry_new_function_transport(send_envelope, NULL));
sentry_options_set_debug(options, g_transport_options.debug);
Expand Down
1 change: 1 addition & 0 deletions sentry-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ android {

externalNativeBuild {
cmake {
setVersion("3.10.2")
setPath("CMakeLists.txt")
}
}
Expand Down