return;
}
arm_msg = (const struct GNUNET_ARM_Message *) msg;
+ GNUNET_break (0 == ntohl (arm_msg->reserved));
id = GNUNET_ntohll (arm_msg->request_id);
cm = find_cm_by_id (h, id);
if (NULL == cm)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting control message with %u bytes of type %u to arm with id %llu\n",
(unsigned int) msize, (unsigned int) ntohs (cm->msg->header.type), request_id);
+ arm_msg->reserved = htonl (0);
arm_msg->request_id = GNUNET_htonll (request_id);
memcpy (buf, cm->msg, msize);
/* Otherwise we won't be able to find it later! */
{
struct ARMControlMessage *cm = cls;
struct GNUNET_ARM_Message *arm_msg;
+
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Control message timed out\n");
arm_msg = cm->msg;
}
-#include "do_start_process.c"
-
-
/**
* A client specifically requested starting of ARM itself.
* This function is called with information about whether
unsigned char test_is_active;
char *cbinary;
char *binary;
+ char *quotedbinary;
char *config;
char *loprefix;
char *lopostfix;
cm->h->cfg, "arm", "CONFIG", &config))
config = NULL;
binary = GNUNET_OS_get_libexec_binary_path (cbinary);
+ GNUNET_asprintf ("edbinary,
+ "\"%s\"",
+ binary);
GNUNET_free (cbinary);
if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value (
cm->h->cfg, "TESTING", "WEAKRANDOM")) &&
/* Means we are ONLY running locally */
/* we're clearly running a test, don't daemonize */
if (NULL == config)
- proc = do_start_process (GNUNET_NO, cm->std_inheritance,
- NULL, loprefix, binary,
- /* no daemonization! */
- lopostfix, NULL);
+ proc = GNUNET_OS_start_process_s (GNUNET_NO, cm->std_inheritance,
+ NULL, loprefix, quotedbinary,
+ /* no daemonization! */
+ lopostfix, NULL);
else
- proc = do_start_process (GNUNET_NO, cm->std_inheritance,
- NULL, loprefix, binary, "-c", config,
- /* no daemonization! */
- lopostfix, NULL);
+ proc = GNUNET_OS_start_process_s (GNUNET_NO, cm->std_inheritance,
+ NULL, loprefix, quotedbinary, "-c", config,
+ /* no daemonization! */
+ lopostfix, NULL);
}
else
{
if (NULL == config)
- proc = do_start_process (GNUNET_NO, cm->std_inheritance,
- NULL, loprefix, binary,
- "-d", lopostfix, NULL);
+ proc = GNUNET_OS_start_process_s (GNUNET_NO, cm->std_inheritance,
+ NULL, loprefix, quotedbinary,
+ "-d", lopostfix, NULL);
else
- proc = do_start_process (GNUNET_NO, cm->std_inheritance,
- NULL, loprefix, binary, "-c", config,
- "-d", lopostfix, NULL);
+ proc = GNUNET_OS_start_process_s (GNUNET_NO, cm->std_inheritance,
+ NULL, loprefix, quotedbinary, "-c",
+ config,
+ "-d", lopostfix, NULL);
}
GNUNET_free (binary);
+ GNUNET_free (quotedbinary);
GNUNET_free_non_null (config);
GNUNET_free (loprefix);
GNUNET_free (lopostfix);
msg = GNUNET_malloc (sizeof (struct GNUNET_ARM_Message) + slen);
msg->header.size = htons (sizeof (struct GNUNET_ARM_Message) + slen);
msg->header.type = htons (type);
+ msg->reserved = htonl (0);
memcpy (&msg[1], service_name, slen);
cm->msg = msg;
LOG (GNUNET_ERROR_TYPE_DEBUG,
msg = GNUNET_malloc (sizeof (struct GNUNET_ARM_Message));
msg->header.size = htons (sizeof (struct GNUNET_ARM_Message));
msg->header.type = htons (GNUNET_MESSAGE_TYPE_ARM_LIST);
+ msg->reserved = htonl (0);
cm->msg = msg;
GNUNET_CONTAINER_DLL_insert_tail (h->control_pending_head,
h->control_pending_tail, cm);