Add some debug

This commit is contained in:
Quentin 2019-05-24 17:32:20 +02:00
parent c4d4288b45
commit fc494f4c9e

View file

@ -105,7 +105,7 @@ void mv_buffer_rtow(struct algo_ctx* app_ctx, struct evt_core_fdinfo* from, stru
// 1. We get the packet buffer
bp = g_hash_table_lookup (app_ctx->used_buffer, &from->fd);
if (bp == NULL) {
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s", from->fd, from->url);
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s in rtow\n", from->fd, from->url);
exit(EXIT_FAILURE);
}
@ -127,7 +127,7 @@ void mv_buffer_rtof(struct algo_ctx* app_ctx, struct evt_core_fdinfo* from) {
// 1. We get the packet buffer
bp = g_hash_table_lookup (app_ctx->used_buffer, &from->fd);
if (bp == NULL) {
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s", from->fd, from->url);
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s in rtof\n", from->fd, from->url);
}
g_hash_table_remove(app_ctx->used_buffer, &(from->fd));
@ -137,7 +137,7 @@ void mv_buffer_rtof(struct algo_ctx* app_ctx, struct evt_core_fdinfo* from) {
void mv_buffer_wtof(struct algo_ctx* app_ctx, struct evt_core_fdinfo* fdinfo) {
struct buffer_packet* bp = g_hash_table_lookup (app_ctx->used_buffer, &(fdinfo->fd));
if (bp == NULL) {
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s", fdinfo->fd, fdinfo->url);
fprintf(stderr, "Unable to find a buffer for fd=%d url=%s in wtof\n", fdinfo->fd, fdinfo->url);
}
g_hash_table_remove(app_ctx->used_buffer, &(fdinfo->fd));
@ -166,7 +166,7 @@ void mv_buffer_atow(struct algo_ctx* app_ctx, void* from, struct evt_core_fdinfo
// 1. We get the buffer
bp = g_hash_table_lookup (app_ctx->application_waiting, from);
if (bp == NULL) {
fprintf(stderr, "Unable to find this application buffer\n");
fprintf(stderr, "Unable to find this application buffer in atow for %s\n", to->url);
exit(EXIT_FAILURE);
}
@ -188,7 +188,7 @@ void mv_buffer_atof(struct algo_ctx* app_ctx, void* from) {
// 1. Remove the buffer
bp = g_hash_table_lookup (app_ctx->application_waiting, from);
if (bp == NULL) {
fprintf(stderr, "Unable to find this application buffer\n");
fprintf(stderr, "Unable to find this application buffer in atof\n");
exit(EXIT_FAILURE);
}
g_hash_table_remove (app_ctx->application_waiting, from);