From 8a17db8266dad0325d04762a27c4f61446d26d2e Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 8 Jul 2018 02:45:16 +0200 Subject: Add 'command id' field to messages This allows for correlating response messages to the command message that caused them. --- src/handlers.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/handlers.rs') diff --git a/src/handlers.rs b/src/handlers.rs index 405fe29da..2b8e51602 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -17,6 +17,7 @@ fn test_example() { #[no_mangle] pub extern "C" fn handle_code_fetch( + cmd_id: u32, module_specifier: *const c_char, containing_file: *const c_char, ) { @@ -24,8 +25,10 @@ pub extern "C" fn handle_code_fetch( let containing_file = string_from_ptr(containing_file); println!( - "handle_code_fetch. module_specifier = {} containing_file = {}", - module_specifier, containing_file + "handle_code_fetch. cmd_id = {} module_specifier = {} containing_file = {}", + cmd_id, + module_specifier, + containing_file ); unimplemented!(); -- cgit v1.2.3