// FIXME: stats!
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Suggesting address `%s' of peer `%s'\n",
+ address,
+ GNUNET_i2s (pid));
env = GNUNET_MQ_msg_extra (as,
slen,
GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION);
losses of sessions (possibly of previous transport), ignore! */
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Allocating %u/%u bytes for %p of peer `%s'\n",
+ ntohl (bw_in.value__),
+ ntohl (bw_out.value__),
+ session,
+ GNUNET_i2s (peer));
env = GNUNET_MQ_msg (sam,
GNUNET_MESSAGE_TYPE_ATS_SESSION_ALLOCATION);
sam->session_id = session->session_id;
GNUNET_SERVICE_client_drop (c->client);
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Client suggested we talk to %s with preference %d at rate %u\n",
+ GNUNET_i2s (&msg->peer),
+ (int) ntohl (msg->pk),
+ (int) ntohl (msg->bw.value__));
cp = GNUNET_new (struct ClientPreference);
cp->client = c;
cp->pref.peer = msg->peer;
&session->data,
address);
GNUNET_assert (NULL != session->sh);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transport has new session %p to %s\n",
+ session,
+ GNUNET_i2s (&message->peer));
GNUNET_SERVICE_client_continue (c->client);
}
GNUNET_CONTAINER_multihashmap32_remove (c->details.transport.sessions,
session->session_id,
session));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transport lost session %p to %s\n",
+ session,
+ GNUNET_i2s (&session->data.peer));
GNUNET_free (session);
GNUNET_SERVICE_client_continue (c->client);
}
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
static int ret;
-
/**
* @brief The time available until the test shuts down
*/
static struct GNUNET_TIME_Relative timeout;
-
/**
* @brief ATS Application Handle
*
*/
static struct GNUNET_ATS_SessionRecord *sr;
+
/**
* @brief Called whenever allocation changed
*
* @param bandwidth_out
* @param bandwidth_in
*
- * @return
+ * @return
*/
static void
allocation_cb (void *cls,
ah = GNUNET_ATS_application_init (cfg);
GNUNET_assert (NULL != ah);
th = GNUNET_ATS_transport_init (cfg,
- allocation_cb,
+ &allocation_cb,
NULL,
- suggestion_cb,
+ &suggestion_cb,
NULL);
GNUNET_assert (NULL != ah);
}
* @param argc
* @param argv[]
*
- * @return
+ * @return
*/
int
main (int argc,