{
const char *pos = (const char *) &lres[1];
uint16_t rcount = ntohs (lres->count);
- uint16_t msize = ntohs (lres->arm_msg.header.size);
+ uint16_t msize = ntohs (lres->arm_msg.header.size) - sizeof (*lres);
uint16_t size_check;
size_check = 0;
uint16_t rcount = ntohs (lres->count);
const char *list[rcount];
const char *pos = (const char *) &lres[1];
- uint16_t msize = ntohs (lres->arm_msg.header.size);
+ uint16_t msize = ntohs (lres->arm_msg.header.size) - sizeof (*lres);
struct GNUNET_ARM_Operation *op;
uint16_t size_check;
uint64_t id;
static int
reconnect_arm (struct GNUNET_ARM_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (arm_result,
- GNUNET_MESSAGE_TYPE_ARM_RESULT,
- struct GNUNET_ARM_ResultMessage);
- GNUNET_MQ_hd_var_size (arm_list_result,
- GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
- struct GNUNET_ARM_ListResultMessage);
- GNUNET_MQ_hd_fixed_size (confirm,
- GNUNET_MESSAGE_TYPE_TEST,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_arm_result_handler (h),
- make_arm_list_result_handler (h),
- make_confirm_handler (h),
+ GNUNET_MQ_hd_fixed_size (arm_result,
+ GNUNET_MESSAGE_TYPE_ARM_RESULT,
+ struct GNUNET_ARM_ResultMessage,
+ h),
+ GNUNET_MQ_hd_var_size (arm_list_result,
+ GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
+ struct GNUNET_ARM_ListResultMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (confirm,
+ GNUNET_MESSAGE_TYPE_ARM_TEST,
+ struct GNUNET_MessageHeader,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *test;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Sending TEST message to ARM\n");
env = GNUNET_MQ_msg (test,
- GNUNET_MESSAGE_TYPE_TEST);
+ GNUNET_MESSAGE_TYPE_ARM_TEST);
GNUNET_MQ_send (h->mq,
env);
return GNUNET_OK;
"PREFIX",
&loprefix))
loprefix = GNUNET_strdup ("");
+ else
+ loprefix = GNUNET_CONFIGURATION_expand_dollar (h->cfg,
+ loprefix);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (h->cfg,
"arm",
"OPTIONS",
&lopostfix))
lopostfix = GNUNET_strdup ("");
+ else
+ lopostfix = GNUNET_CONFIGURATION_expand_dollar (h->cfg,
+ lopostfix);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (h->cfg,
"arm",
type);
msg->reserved = htonl (0);
msg->request_id = GNUNET_htonll (op->id);
- memcpy (&msg[1],
+ GNUNET_memcpy (&msg[1],
service_name,
slen);
GNUNET_MQ_send (h->mq,