Log what is happening with window and session reference counts much more

obviously.
This commit is contained in:
nicm
2017-04-28 19:13:55 +00:00
parent bcd6b41674
commit 0f2f783584
6 changed files with 41 additions and 25 deletions

View File

@ -101,12 +101,12 @@ notify_callback(struct cmdq_item *item, void *data)
if (ne->client != NULL)
server_client_unref(ne->client);
if (ne->session != NULL)
session_unref(ne->session);
session_remove_ref(ne->session, __func__);
if (ne->window != NULL)
window_remove_ref(ne->window);
window_remove_ref(ne->window, __func__);
if (ne->fs.s != NULL)
session_unref(ne->fs.s);
session_remove_ref(ne->fs.s, __func__);
free((void *)ne->name);
free(ne);
@ -136,13 +136,13 @@ notify_add(const char *name, struct cmd_find_state *fs, struct client *c,
if (c != NULL)
c->references++;
if (s != NULL)
s->references++;
session_add_ref(s, __func__);
if (w != NULL)
w->references++;
window_add_ref(w, __func__);
cmd_find_copy_state(&ne->fs, fs);
if (ne->fs.s != NULL)
ne->fs.s->references++; /* cmd_find_valid_state need session */
if (ne->fs.s != NULL) /* cmd_find_valid_state needs session */
session_add_ref(ne->fs.s, __func__);
new_item = cmdq_get_callback(notify_callback, ne);
cmdq_append(NULL, new_item);