Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade SDK to 12.0 and make storage_id pointer const #261

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ARG SLIRP4NETNS_VERSION=1.2.3
ARG REPO=axisecp
ARG ARCH=armv7hf

ARG VERSION=1.14
ARG UBUNTU_VERSION=22.04
ARG VERSION=master # TODO: Change to 12.0 before merging
ARG UBUNTU_VERSION=24.04
ARG NATIVE_SDK=acap-native-sdk

FROM ${REPO}/${NATIVE_SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} AS sdk_image
Expand Down
10 changes: 4 additions & 6 deletions app/sd_disk_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct sd_disk_storage {
AXStorage* handle;
};

static bool event_status_or_log(gchar* storage_id, AXStorageStatusEventId event) {
static bool event_status_or_log(const gchar* storage_id, AXStorageStatusEventId event) {
GError* error = NULL;
bool value = ax_storage_get_status(storage_id, event, &error);
if (error) {
Expand Down Expand Up @@ -79,7 +79,7 @@ void sd_disk_storage_free(struct sd_disk_storage* storage) {
free(storage);
}

static void subscribe_cb(gchar* storage_id, gpointer storage_void_ptr, GError* error) {
static void subscribe_cb(const gchar* storage_id, gpointer storage_void_ptr, GError* error) {
struct sd_disk_storage* storage = storage_void_ptr;

if (error) {
Expand Down Expand Up @@ -110,10 +110,8 @@ static bool subscribe(struct sd_disk_storage* storage, const char* storage_id) {
if (strcmp(node->data, storage_id) == 0) {
found = true;
if (!(storage->subscription_id =
ax_storage_subscribe(node->data, subscribe_cb, storage, &error))) {
log_error("Failed to subscribe to events of %s: %s",
(char*)node->data,
error->message);
ax_storage_subscribe(storage_id, subscribe_cb, storage, &error))) {
log_error("Failed to subscribe to events of %s: %s", storage_id, error->message);
g_clear_error(&error);
return false;
}
Expand Down
Loading