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

How to send a sync_log_storage request and wait for a response #608

Open
jonathanmaw opened this issue Mar 11, 2024 · 2 comments
Open

How to send a sync_log_storage request and wait for a response #608

jonathanmaw opened this issue Mar 11, 2024 · 2 comments
Assignees
Labels

Comments

@jonathanmaw
Copy link

Hi,

I've been trying to use the DLT control interface to request that the DLT daemon sync its logs (using dlt_client_send_ctrl_msg() with a DltServiceOfflineLogstorage payload), but I recently noticed that this function returns as soon as the request is sent, not when it receives confirmation that the logs have finished syncing.

Looking through DLT Daemon's source code, it seems that a message with a DltServiceResponse payload it sent.

How can I wait until it has been received?

libdlt's dlt_client.h has a dlt_client_main_loop(), which, when combined with dlt_client_register_message_callback() and dlt_client_register_fetch_next_message_callback() would give me access to any messages that get received, and gives me a way to terminate the loop.

Is this the best way to wait until a response is received, and is there a good way to make this time out if the DLT daemon stops responding?

Thanks,

Jonathan

@minminlittleshrimp minminlittleshrimp self-assigned this Apr 29, 2024
@minminlittleshrimp
Copy link
Collaborator

Let me check in my local, sorry for late response!

@jonathanmaw
Copy link
Author

Hi, have you had a chance to look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants