diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-23 22:26:16 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-23 22:26:16 +0100 |
commit | e8161df3c3fc2aaeef4adb81abb5eed3505c9409 (patch) | |
tree | 292ef715da70fc512b39042b4e5eaed852a60272 | |
parent | 948db0da2ca7b04e08c42676ca6624c0ce61dbb6 (diff) | |
download | libgnunetchat-e8161df3c3fc2aaeef4adb81abb5eed3505c9409.tar.gz libgnunetchat-e8161df3c3fc2aaeef4adb81abb5eed3505c9409.zip |
Define service names as local constants
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | src/gnunet_chat_handle_intern.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c index 6382ff1..d5c2afe 100644 --- a/src/gnunet_chat_handle_intern.c +++ b/src/gnunet_chat_handle_intern.c | |||
@@ -36,6 +36,13 @@ | |||
36 | 36 | ||
37 | #define GNUNET_UNUSED __attribute__ ((unused)) | 37 | #define GNUNET_UNUSED __attribute__ ((unused)) |
38 | 38 | ||
39 | static const char gnunet_service_name_arm [] = "arm"; | ||
40 | static const char gnunet_service_name_fs [] = "fs"; | ||
41 | static const char gnunet_service_name_gns [] = "gns"; | ||
42 | static const char gnunet_service_name_identity [] = "identity"; | ||
43 | static const char gnunet_service_name_messenger [] = "messenger"; | ||
44 | static const char gnunet_service_name_namestore [] = "namestore"; | ||
45 | |||
39 | void | 46 | void |
40 | on_handle_shutdown(void *cls) | 47 | on_handle_shutdown(void *cls) |
41 | { | 48 | { |
@@ -57,37 +64,37 @@ on_handle_arm_connection(void *cls, | |||
57 | 64 | ||
58 | if (GNUNET_YES == connected) { | 65 | if (GNUNET_YES == connected) { |
59 | GNUNET_ARM_request_service_start( | 66 | GNUNET_ARM_request_service_start( |
60 | chat->arm, "identity", | 67 | chat->arm, gnunet_service_name_identity, |
61 | GNUNET_OS_INHERIT_STD_NONE, | 68 | GNUNET_OS_INHERIT_STD_NONE, |
62 | NULL, NULL | 69 | NULL, NULL |
63 | ); | 70 | ); |
64 | 71 | ||
65 | GNUNET_ARM_request_service_start( | 72 | GNUNET_ARM_request_service_start( |
66 | chat->arm, "messenger", | 73 | chat->arm, gnunet_service_name_messenger, |
67 | GNUNET_OS_INHERIT_STD_NONE, | 74 | GNUNET_OS_INHERIT_STD_NONE, |
68 | NULL, NULL | 75 | NULL, NULL |
69 | ); | 76 | ); |
70 | 77 | ||
71 | GNUNET_ARM_request_service_start( | 78 | GNUNET_ARM_request_service_start( |
72 | chat->arm, "fs", | 79 | chat->arm, gnunet_service_name_fs, |
73 | GNUNET_OS_INHERIT_STD_NONE, | 80 | GNUNET_OS_INHERIT_STD_NONE, |
74 | NULL, NULL | 81 | NULL, NULL |
75 | ); | 82 | ); |
76 | 83 | ||
77 | GNUNET_ARM_request_service_start( | 84 | GNUNET_ARM_request_service_start( |
78 | chat->arm, "gns", | 85 | chat->arm, gnunet_service_name_gns, |
79 | GNUNET_OS_INHERIT_STD_NONE, | 86 | GNUNET_OS_INHERIT_STD_NONE, |
80 | NULL, NULL | 87 | NULL, NULL |
81 | ); | 88 | ); |
82 | 89 | ||
83 | GNUNET_ARM_request_service_start( | 90 | GNUNET_ARM_request_service_start( |
84 | chat->arm, "namestore", | 91 | chat->arm, gnunet_service_name_namestore, |
85 | GNUNET_OS_INHERIT_STD_NONE, | 92 | GNUNET_OS_INHERIT_STD_NONE, |
86 | NULL, NULL | 93 | NULL, NULL |
87 | ); | 94 | ); |
88 | } else { | 95 | } else { |
89 | GNUNET_ARM_request_service_start( | 96 | GNUNET_ARM_request_service_start( |
90 | chat->arm, "arm", | 97 | chat->arm, gnunet_service_name_arm, |
91 | GNUNET_OS_INHERIT_STD_NONE, | 98 | GNUNET_OS_INHERIT_STD_NONE, |
92 | NULL, NULL | 99 | NULL, NULL |
93 | ); | 100 | ); |