struct MeshTunnel *t = cls;
struct MeshTunnelChildInfo *cinfo;
struct GNUNET_PeerIdentity peer;
+ uint32_t ack;
GNUNET_PEER_resolve (id, &peer);
cinfo = tunnel_get_neighbor_fc (t, &peer);
+ ack = cinfo->bck_pid + t->bck_queue_max - t->bck_queue_n;
- if (cinfo->bck_ack != cinfo->bck_pid &&
- GNUNET_NO == GMC_is_pid_bigger (cinfo->bck_ack, cinfo->bck_pid))
+ if (cinfo->bck_ack == ack)
{
+ // FIXME fc allow force on poll
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
" Not sending ACK, not needed\n");
return;
}
+ cinfo->bck_ack = ack;
- cinfo->bck_ack = t->bck_queue_max - t->bck_queue_n + cinfo->bck_pid;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- " Sending BCK ACK %u\n",
- cinfo->bck_ack);
- send_ack (t, &peer, cinfo->bck_ack);
+ " Sending BCK ACK %u (last sent: %u)\n",
+ ack, cinfo->bck_ack);
+ send_ack (t, &peer, ack);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " (SERVER DOWN)\n");
return;
}
+
+// return; uncomment for regex_profiler
c = clients;
while (NULL != c)
{
msg = (struct GNUNET_MESH_RegexAnnounce *) message;
len = ntohs (message->size) - sizeof(struct GNUNET_MESH_RegexAnnounce);
regex = GNUNET_malloc (len + 1);
- memcpy (regex, &message[1], len);
+ memcpy (regex, &msg[1], len);
regex[len] = '\0';
rd.regex = regex;
rd.compression = ntohs (msg->compression_characters);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " length %u\n", len);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " regex %s\n", regex);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " cm %u\n", ntohs(rd.compression));
GNUNET_array_append (c->regexes, c->n_regex, rd);
if (GNUNET_SCHEDULER_NO_TASK == c->regex_announce_task)
{
GNUNET_PEER_resolve (t->id.oid, ©->oid);
copy->tid = htonl (t->id.tid);
copy->ttl = htonl (default_ttl);
- copy->pid = htonl (++(t->bck_pid));
+ copy->pid = htonl (t->bck_pid + 1);
copy->sender = my_full_id;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,