Remove application from socket hash table upon unregister
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 10 Jan 2012 20:25:34 +0000 (15:25 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 10 Jan 2012 20:25:34 +0000 (15:25 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-sessiond/ust-app.c

index 8bfb6b264aa5c27166d75905c1b6a55f2dae6716..9c500481e0b52531962733a604b2cfdc51039e35 100644 (file)
@@ -1299,6 +1299,11 @@ void ust_app_unregister(int sock)
 
        DBG("PID %d unregistering with sock %d", lta->key.pid, sock);
 
+       /* Remove application from socket hash table */
+       lttng_ht_lookup(ust_app_sock_key_map, (void *)((unsigned long) sock), &iter);
+       ret = lttng_ht_del(ust_app_sock_key_map, &iter);
+       assert(!ret);
+
        /* Get the node reference for a call_rcu */
        lttng_ht_lookup(ust_app_ht, (void *)((unsigned long) lta->key.pid), &iter);
        node = lttng_ht_iter_get_node_ulong(&iter);
@@ -1307,6 +1312,7 @@ void ust_app_unregister(int sock)
                goto error;
        }
 
+       /* Remove application from PID hash table */
        ret = lttng_ht_del(ust_app_ht, &iter);
        assert(!ret);
        call_rcu(&node->head, delete_ust_app_rcu);
This page took 0.026659 seconds and 4 git commands to generate.