Signed-off-by: David Goulet <dgoulet@efficios.com>
/* Putting back the HT pointer and start copying socket(s). */
output->socks = tmp_ht_ptr;
/* Putting back the HT pointer and start copying socket(s). */
output->socks = tmp_ht_ptr;
cds_lfht_for_each_entry(obj->socks->ht, &iter.iter, socket, node.node) {
/* Create new socket object. */
copy_sock = consumer_allocate_socket(socket->fd);
if (copy_sock == NULL) {
cds_lfht_for_each_entry(obj->socks->ht, &iter.iter, socket, node.node) {
/* Create new socket object. */
copy_sock = consumer_allocate_socket(socket->fd);
if (copy_sock == NULL) {
copy_sock->lock = socket->lock;
consumer_add_socket(copy_sock, output);
}
copy_sock->lock = socket->lock;
consumer_add_socket(copy_sock, output);
}
DBG3("Consumer data pending for id %u", id);
/* Send command for each consumer */
DBG3("Consumer data pending for id %u", id);
/* Send command for each consumer */
cds_lfht_for_each_entry(consumer->socks->ht, &iter.iter, socket,
node.node) {
/* Code flow error */
cds_lfht_for_each_entry(consumer->socks->ht, &iter.iter, socket,
node.node) {
/* Code flow error */
/* The above call will print a PERROR on error. */
DBG("Error on consumer is data pending on sock %d", socket->fd);
pthread_mutex_unlock(socket->lock);
/* The above call will print a PERROR on error. */
DBG("Error on consumer is data pending on sock %d", socket->fd);
pthread_mutex_unlock(socket->lock);
/* The above call will print a PERROR on error. */
DBG("Error on recv consumer is data pending on sock %d", socket->fd);
pthread_mutex_unlock(socket->lock);
/* The above call will print a PERROR on error. */
DBG("Error on recv consumer is data pending on sock %d", socket->fd);
pthread_mutex_unlock(socket->lock);
}
pthread_mutex_unlock(socket->lock);
}
pthread_mutex_unlock(socket->lock);
DBG("Consumer data is %s pending for session id %u",
ret_code == 1 ? "" : "NOT", id);
return ret_code;
DBG("Consumer data is %s pending for session id %u",
ret_code == 1 ? "" : "NOT", id);
return ret_code;
+error_unlock:
+ rcu_read_unlock();