- struct MonitorMessage *mm = (struct MonitorMessage *) message;
- size_t msg_size;
- uint32_t id;
-
- msg_size = ntohs (message->size);
- if (msg_size < sizeof (struct MonitorMessage))
- return;
-
- id = ntohl (mm->id);
-
- switch (ntohl (mm->op)) {
- case GNUNET_YES:
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received `START' message\n");
- break;
- case GNUNET_NO:
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received `STOP' message\n");
- break;
- default:
- break;
- }
-
-
+/* Notify here */
+ GAS_performance_notify_all_clients (peer,
+ plugin_name,
+ plugin_addr, plugin_addr_len,
+ active,
+ ats, ats_count,
+ bandwidth_out, bandwidth_in);
+
+#if 0
+ struct PerformanceClient *cur;
+ struct PerformanceMonitorClient *curm;
+ struct MonitorResponseMessage *mrm;
+ size_t msglen;
+
+ msglen = sizeof (struct MonitorResponseMessage) +
+ ats_count * sizeof (struct GNUNET_ATS_Information);
+ mrm = GNUNET_malloc (msglen);
+
+ mrm->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_MONITOR_RESPONSE);
+ mrm->header.size = htons (msglen);
+ mrm->ats_count = htonl (ats_count);
+ mrm->peer = *peer;
+ memcpy (&mrm[1], ats, ats_count * sizeof (struct GNUNET_ATS_Information));
+
+ for (cur = pc_head; NULL != cur; cur = cur->next)
+ for (curm = cur->pm_head; NULL != curm; curm = curm->next)
+ {
+ /* Notify client about update */
+ mrm->id = htonl (curm->id);
+ GNUNET_SERVER_notification_context_unicast (nc,
+ cur->client,
+ (struct GNUNET_MessageHeader *) mrm,
+ GNUNET_YES);
+ }
+ GNUNET_free (mrm);
+#endif