- offset += sizeof (struct RegexEdge);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "* Edge %u, off %u\n", i, offset);
- if (offset >= size) /* Is it safe to access the next edge block? */
- {
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "* Size not enough for RegexEdge, END\n");
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
- edge = (struct RegexEdge *) aux;
- n_token = ntohl (edge->n_token);
- offset += n_token;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "* Token length %u, off %u\n", n_token, offset);
- if (offset > size) /* Is it safe to access the edge token? */
- {
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "* Size not enough for edge token, END\n");
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
- aux = (char *) &edge[1]; /* Skip edge block */
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Edge %u/%u, off %u tokenlen %u (%.*s)\n",
+ n+1, num_edges, off,
+ ntohs (edges[n].token_length), ntohs (edges[n].token_length),
+ &aux[off]);