Users of get_client_from_sock() must hold the RCU read lock
for the duration of the use of the notification_client.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I644e549187ee47c959eeb692e27be111343d8979
size_t offset;
bool message_is_complete = false;
size_t offset;
bool message_is_complete = false;
client = get_client_from_socket(socket, state);
if (!client) {
/* Internal error, abort. */
client = get_client_from_socket(socket, state);
if (!client) {
/* Internal error, abort. */
return ret;
error_disconnect_client:
pthread_mutex_lock(&client->lock);
ret = notification_thread_client_disconnect(client, state);
pthread_mutex_unlock(&client->lock);
return ret;
error_disconnect_client:
pthread_mutex_lock(&client->lock);
ret = notification_thread_client_disconnect(client, state);
pthread_mutex_unlock(&client->lock);
}
/* Client ready to receive outgoing data. */
}
/* Client ready to receive outgoing data. */
struct notification_client *client;
enum client_transmission_status transmission_status;
struct notification_client *client;
enum client_transmission_status transmission_status;
client = get_client_from_socket(socket, state);
if (!client) {
/* Internal error, abort. */
client = get_client_from_socket(socket, state);
if (!client) {
/* Internal error, abort. */