aboutsummaryrefslogtreecommitdiff
path: root/src/sensor/sensor_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensor/sensor_api.c')
-rw-r--r--src/sensor/sensor_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sensor/sensor_api.c b/src/sensor/sensor_api.c
index b7ee55fb6..9a18427d0 100644
--- a/src/sensor/sensor_api.c
+++ b/src/sensor/sensor_api.c
@@ -426,13 +426,16 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h,
426 * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO 426 * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO
427 */ 427 */
428void 428void
429GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, 429GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name,
430 char *sensor_name, int anomalous) 430 int anomalous)
431{ 431{
432 struct ForceAnomalyMessage *msg; 432 struct ForceAnomalyMessage *msg;
433 struct GNUNET_MQ_Envelope *ev; 433 struct GNUNET_MQ_Envelope *ev;
434 434
435 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_REPORT); 435 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_FORCE);
436 GNUNET_CRYPTO_hash (sensor_name, strlen (sensor_name) + 1,
437 &msg->sensor_name_hash);
438 msg->anomalous = htons (anomalous);
436 GNUNET_MQ_send (h->mq, ev); 439 GNUNET_MQ_send (h->mq, ev);
437} 440}
438 441