core-new now compiles
authorChristian Grothoff <christian@grothoff.org>
Mon, 10 Oct 2011 08:02:30 +0000 (08:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 10 Oct 2011 08:02:30 +0000 (08:02 +0000)
src/core/Makefile.am
src/core/gnunet-service-core_kx.c
src/core/gnunet-service-core_sessions.c

index 65883d5377005ae044f4ea780c68212013391168..9c559f764352e057bbb6321e08ec0c8eb4a796f6 100644 (file)
@@ -26,6 +26,7 @@ libgnunetcore_la_LDFLAGS = \
 
 bin_PROGRAMS = \
  gnunet-service-core \
+ gnunet-service-core-new \
  gnunet-core-list-connections
 
 gnunet_service_core_SOURCES = \
index 6c9e9437ac63e6266749ac11ff37585ca5326ff5..5c3098194513e84b46f78e71f093f52c6087cf51 100644 (file)
@@ -737,7 +737,7 @@ GSC_KX_handle_set_key (struct GSC_KeyExchangeInfo *kx,
   if (kx->public_key == NULL)
   {
     GNUNET_free_non_null (kx->skm_received);
-    kx->skm_received = GNUNET_copy_message (msg);
+    kx->skm_received = (struct SetKeyMessage*) GNUNET_copy_message (msg);
     return;
   }
   if (0 !=
@@ -866,7 +866,7 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx,
     {
       /* defer */
       GNUNET_free_non_null (kx->ping_received);
-      kx->ping_received = GNUNET_copy_message (msg);
+      kx->ping_received = (struct PingMessage*) GNUNET_copy_message (msg);
       return;
     }
   m = (const struct PingMessage*) msg;
@@ -1065,7 +1065,7 @@ GSC_KX_handle_pong (struct GSC_KeyExchangeInfo *kx, const struct GNUNET_MessageH
     if (kx->status == KX_STATE_KEY_SENT)
     {
       GNUNET_free_non_null (kx->pong_received);
-      kx->pong_received = GNUNET_copy_message (msg);
+      kx->pong_received = (struct PongMessage*) GNUNET_copy_message (msg);
     }
     return;
   }
index 6e1494373a8004a984657d5837b1d557f006ceef..93f9b69508b2c02f1a38c35781d02642a86fc6de 100644 (file)
@@ -121,6 +121,41 @@ struct Session
    */
   GNUNET_SCHEDULER_TaskIdentifier cork_task;
 
+  /**
+   * Tracking bandwidth for sending to this peer.
+   * // FIXME: unused! should it be used?
+   */
+  struct GNUNET_BANDWIDTH_Tracker available_send_window;
+
+  /**
+   * Tracking bandwidth for receiving from this peer.
+   * // FIXME: need to set it!
+   */
+  struct GNUNET_BANDWIDTH_Tracker available_recv_window;
+
+  /**
+   * Available bandwidth out for this peer (current target).
+   * // FIXME: check usage!
+   */
+  struct GNUNET_BANDWIDTH_Value32NBO bw_out;
+
+  /**
+   * Internal bandwidth limit set for this peer (initially typically
+   * set to "-1").  Actual "bw_out" is MIN of
+   * "bpm_out_internal_limit" and "bw_out_external_limit".
+   * // FIXME: check usage
+   */
+  struct GNUNET_BANDWIDTH_Value32NBO bw_out_internal_limit;
+
+  /**
+   * External bandwidth limit set for this peer by the
+   * peer that we are communicating with.  "bw_out" is MIN of
+   * "bw_out_internal_limit" and "bw_out_external_limit".
+   * // FIXME: check usage
+   */
+  struct GNUNET_BANDWIDTH_Value32NBO bw_out_external_limit;
+
+
   /**
    * Is the neighbour queue empty and thus ready for us
    * to transmit an encrypted message?