diff options
Diffstat (limited to 'src/testing/testing_api_cmd_send_peer_ready.c')
-rw-r--r-- | src/testing/testing_api_cmd_send_peer_ready.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_send_peer_ready.c b/src/testing/testing_api_cmd_send_peer_ready.c index afe28de77..016837214 100644 --- a/src/testing/testing_api_cmd_send_peer_ready.c +++ b/src/testing/testing_api_cmd_send_peer_ready.c | |||
@@ -29,14 +29,30 @@ | |||
29 | #include "testing_cmds.h" | 29 | #include "testing_cmds.h" |
30 | 30 | ||
31 | 31 | ||
32 | /** | ||
33 | * Struct to hold information for callbacks. | ||
34 | * | ||
35 | */ | ||
32 | struct SendPeerReadyState | 36 | struct SendPeerReadyState |
33 | { | 37 | { |
38 | /** | ||
39 | * Callback to write messages to the master loop. | ||
40 | * | ||
41 | */ | ||
34 | TESTING_CMD_HELPER_write_cb write_message; | 42 | TESTING_CMD_HELPER_write_cb write_message; |
35 | 43 | ||
44 | /** | ||
45 | * The message send back to the master loop. | ||
46 | * | ||
47 | */ | ||
36 | struct GNUNET_CMDS_PEER_STARTED *reply; | 48 | struct GNUNET_CMDS_PEER_STARTED *reply; |
37 | }; | 49 | }; |
38 | 50 | ||
39 | 51 | ||
52 | /** | ||
53 | * Trait function of this cmd does nothing. | ||
54 | * | ||
55 | */ | ||
40 | static int | 56 | static int |
41 | send_peer_ready_traits (void *cls, | 57 | send_peer_ready_traits (void *cls, |
42 | const void **ret, | 58 | const void **ret, |
@@ -47,6 +63,10 @@ send_peer_ready_traits (void *cls, | |||
47 | } | 63 | } |
48 | 64 | ||
49 | 65 | ||
66 | /** | ||
67 | * The cleanup function of this cmd frees resources the cmd allocated. | ||
68 | * | ||
69 | */ | ||
50 | static void | 70 | static void |
51 | send_peer_ready_cleanup (void *cls, | 71 | send_peer_ready_cleanup (void *cls, |
52 | const struct GNUNET_TESTING_Command *cmd) | 72 | const struct GNUNET_TESTING_Command *cmd) |
@@ -58,6 +78,10 @@ send_peer_ready_cleanup (void *cls, | |||
58 | } | 78 | } |
59 | 79 | ||
60 | 80 | ||
81 | /** | ||
82 | * This function sends a GNUNET_MESSAGE_TYPE_CMDS_HELPER_PEER_STARTED message to the master loop. | ||
83 | * | ||
84 | */ | ||
61 | static void | 85 | static void |
62 | send_peer_ready_run (void *cls, | 86 | send_peer_ready_run (void *cls, |
63 | const struct GNUNET_TESTING_Command *cmd, | 87 | const struct GNUNET_TESTING_Command *cmd, |
@@ -80,6 +104,7 @@ send_peer_ready_run (void *cls, | |||
80 | * Create command. | 104 | * Create command. |
81 | * | 105 | * |
82 | * @param label name for command. | 106 | * @param label name for command. |
107 | * @param write_message Callback to write messages to the master loop. | ||
83 | * @return command. | 108 | * @return command. |
84 | */ | 109 | */ |
85 | struct GNUNET_TESTING_Command | 110 | struct GNUNET_TESTING_Command |