[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36332 - gnunet/src/psycstore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36332 - gnunet/src/psycstore |
Date: |
Sun, 6 Sep 2015 01:44:03 +0200 |
Author: tg
Date: 2015-09-06 01:44:03 +0200 (Sun, 06 Sep 2015)
New Revision: 36332
Modified:
gnunet/src/psycstore/psyc_util_lib.c
Log:
psyc: add STATE_MODIFY flag during transmit
Modified: gnunet/src/psycstore/psyc_util_lib.c
===================================================================
--- gnunet/src/psycstore/psyc_util_lib.c 2015-09-05 22:36:14 UTC (rev
36331)
+++ gnunet/src/psycstore/psyc_util_lib.c 2015-09-05 23:44:03 UTC (rev
36332)
@@ -677,16 +677,6 @@
tmit->msg = GNUNET_malloc (sizeof (*tmit->msg) + sizeof (*pmeth) + size);
tmit->msg->size = sizeof (*tmit->msg) + sizeof (*pmeth) + size;
- pmeth = (struct GNUNET_PSYC_MessageMethod *) &tmit->msg[1];
- pmeth->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD);
- pmeth->header.size = htons (sizeof (*pmeth) + size);
- pmeth->flags = htonl (flags);
- memcpy (&pmeth[1], method_name, size);
-
- tmit->state = GNUNET_PSYC_MESSAGE_STATE_MODIFIER;
- tmit->notify_data = notify_data;
- tmit->notify_data_cls = notify_cls;
-
if (NULL != notify_mod)
{
tmit->notify_mod = notify_mod;
@@ -701,6 +691,13 @@
struct GNUNET_ENV_Modifier mod = {};
mod.next = GNUNET_ENV_environment_head (env);
tmit->mod = &mod;
+
+ struct GNUNET_ENV_Modifier *m = tmit->mod;
+ while (NULL != (m = m->next))
+ {
+ if (m->oper != GNUNET_ENV_OP_SET)
+ flags |= GNUNET_PSYC_MASTER_TRANSMIT_STATE_MODIFY;
+ }
}
else
{
@@ -708,6 +705,16 @@
}
}
+ pmeth = (struct GNUNET_PSYC_MessageMethod *) &tmit->msg[1];
+ pmeth->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD);
+ pmeth->header.size = htons (sizeof (*pmeth) + size);
+ pmeth->flags = htonl (flags);
+ memcpy (&pmeth[1], method_name, size);
+
+ tmit->state = GNUNET_PSYC_MESSAGE_STATE_MODIFIER;
+ tmit->notify_data = notify_data;
+ tmit->notify_data_cls = notify_cls;
+
transmit_mod (tmit);
return GNUNET_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36332 - gnunet/src/psycstore,
gnunet <=