}
}
- if(found) {
- buffers_to_export--;
- }
- else {
+ if(!found) {
ERR("channel not found (%s)", channel_and_cpu);
}
list_add(&bc->list, &blocked_consumers);
+ /* Being here is the proof the daemon has mapped the buffer in its
+ * memory. We may now decrement buffers_to_export.
+ */
+ if(atomic_long_read(&buf->consumed) == 0) {
+ DBG("decrementing buffers_to_export");
+ buffers_to_export--;
+ }
+
break;
}
}
list_del(&bc->list);
}
+ ustcomm_free_app(&ustcomm_app);
+
+ buffers_to_export = 0;
have_listener = 0;
init_socket();
create_listener();