Skip to content

Commit

Permalink
Merge pull request #1494 from atsign-foundation/xc-32bit-support
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth authored Nov 5, 2024
2 parents 81b57f7 + 176ffb5 commit f608213
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/c/.clangd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CompileFlags:
# Use gcc in development for better diagnostics
# & Ensure that compilation doesn't fail due to warnings
Compiler: gcc
Add: [-Wno-error]
Add: [-Wno-error, -xc, -std=c99]

Index:
# Enable background indexing for better symbol information
Expand All @@ -15,4 +15,3 @@ Diagnostics:
# Avoid running slow clang-tidy checks
ClangTidy:
FastCheckFilter: Loose

5 changes: 4 additions & 1 deletion packages/c/sshnpd/src/background_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
#include <sshnpd/background_jobs.h>
#include <sshnpd/sshnpd.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

const int64_t THIRTY_DAYS_MS = (int64_t)30 * 24 * 60 * 60 * 1000;

#define LOGGER_TAG "refresh_device_entry"

void *refresh_device_entry(void *void_refresh_device_entry_params) {
Expand Down Expand Up @@ -70,7 +73,7 @@ void *refresh_device_entry(void *void_refresh_device_entry_params) {
atclient_atkey_metadata_set_is_encrypted(metadata, true);
atclient_atkey_metadata_set_ttr(metadata, -1);
atclient_atkey_metadata_set_ccd(metadata, true);
atclient_atkey_metadata_set_ttl(metadata, (long)30 * 24 * 60 * 60 * 1000); // 30 days in ms
atclient_atkey_metadata_set_ttl(metadata, THIRTY_DAYS_MS);

buffer_len = strlen(params->params->manager_list[index]) + usernamekey_base_len;
// example: @client_atsign:device_info.device_name.sshnp@client_atsign
Expand Down

0 comments on commit f608213

Please sign in to comment.