diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-29 22:26:21 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-29 22:26:21 +0100 |
commit | e871f8368c8a1f0867f68f656875e4c37c26f298 (patch) | |
tree | c2aa6a2b40213d695e8f047a51695563f44d74b8 /src/arm | |
parent | f8bccfbb602bdbed4bcc00fd3c6c3a00add82416 (diff) | |
download | gnunet-e871f8368c8a1f0867f68f656875e4c37c26f298.tar.gz gnunet-e871f8368c8a1f0867f68f656875e4c37c26f298.zip |
finish (?) libgnunetatstransport for now
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/gnunet-service-arm.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index bc138e6fc..c9c9b3638 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
@@ -469,7 +469,7 @@ get_server_addresses (const char *service_name, | |||
469 | #endif | 469 | #endif |
470 | if ( (GNUNET_YES != abstract) && | 470 | if ( (GNUNET_YES != abstract) && |
471 | (GNUNET_OK != | 471 | (GNUNET_OK != |
472 | GNUNET_DISK_directory_create_for_file (unixpath)) ) | 472 | GNUNET_DISK_directory_create_for_file (unixpath)) ) |
473 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, | 473 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, |
474 | "mkdir", | 474 | "mkdir", |
475 | unixpath); | 475 | unixpath); |
@@ -1234,18 +1234,8 @@ static int | |||
1234 | check_start (void *cls, | 1234 | check_start (void *cls, |
1235 | const struct GNUNET_ARM_Message *amsg) | 1235 | const struct GNUNET_ARM_Message *amsg) |
1236 | { | 1236 | { |
1237 | uint16_t size; | ||
1238 | const char *servicename; | ||
1239 | |||
1240 | (void) cls; | 1237 | (void) cls; |
1241 | size = ntohs (amsg->header.size) - sizeof (struct GNUNET_ARM_Message); | 1238 | GNUNET_MQ_check_zero_termination (amsg); |
1242 | servicename = (const char *) &amsg[1]; | ||
1243 | if ( (0 == size) || | ||
1244 | (servicename[size - 1] != '\0') ) | ||
1245 | { | ||
1246 | GNUNET_break (0); | ||
1247 | return GNUNET_SYSERR; | ||
1248 | } | ||
1249 | return GNUNET_OK; | 1239 | return GNUNET_OK; |
1250 | } | 1240 | } |
1251 | 1241 | ||
@@ -1327,18 +1317,8 @@ static int | |||
1327 | check_stop (void *cls, | 1317 | check_stop (void *cls, |
1328 | const struct GNUNET_ARM_Message *amsg) | 1318 | const struct GNUNET_ARM_Message *amsg) |
1329 | { | 1319 | { |
1330 | uint16_t size; | ||
1331 | const char *servicename; | ||
1332 | |||
1333 | (void) cls; | 1320 | (void) cls; |
1334 | size = ntohs (amsg->header.size) - sizeof (struct GNUNET_ARM_Message); | 1321 | GNUNET_MQ_check_zero_termination (amsg); |
1335 | servicename = (const char *) &amsg[1]; | ||
1336 | if ( (0 == size) || | ||
1337 | (servicename[size - 1] != '\0') ) | ||
1338 | { | ||
1339 | GNUNET_break (0); | ||
1340 | return GNUNET_SYSERR; | ||
1341 | } | ||
1342 | return GNUNET_OK; | 1322 | return GNUNET_OK; |
1343 | } | 1323 | } |
1344 | 1324 | ||
@@ -1715,7 +1695,7 @@ delayed_restart_task (void *cls) | |||
1715 | * Task triggered whenever we receive a SIGCHLD (child | 1695 | * Task triggered whenever we receive a SIGCHLD (child |
1716 | * process died). | 1696 | * process died). |
1717 | * | 1697 | * |
1718 | * @param cls closure, NULL | 1698 | * @param cls closure, NULL |
1719 | */ | 1699 | */ |
1720 | static void | 1700 | static void |
1721 | maint_child_death (void *cls) | 1701 | maint_child_death (void *cls) |
@@ -2230,7 +2210,7 @@ run (void *cls, | |||
2230 | start_system = GNUNET_CONFIGURATION_get_value_yesno (cfg, | 2210 | start_system = GNUNET_CONFIGURATION_get_value_yesno (cfg, |
2231 | "ARM", | 2211 | "ARM", |
2232 | "START_SYSTEM_SERVICES"); | 2212 | "START_SYSTEM_SERVICES"); |
2233 | if ( (GNUNET_NO == start_user) && | 2213 | if ( (GNUNET_NO == start_user) && |
2234 | (GNUNET_NO == start_system) ) | 2214 | (GNUNET_NO == start_system) ) |
2235 | { | 2215 | { |
2236 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2216 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |