# session_add_ref

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L165
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-session_add_ref/

```c
void session_add_ref(struct session *s, const char *from)
```

## Parameters

- `s` (`struct session *`)
- `from` (`const char *`)

## Called by

- [`cmd_run_shell_exec`](/en/tmux/3.2a/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-run-shell.c#L151)
- [`notify_add`](/en/tmux/3.2a/reference/c-function-notify-c-notify_add/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/notify.c#L183)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L168)

## Referenced by

- [`control_notify_input`](/en/tmux/3.2a/reference/c-function-control_notify_input/) (function)

## Referenced declarations

- [`session.name`](/en/tmux/3.2a/reference/c-struct-session-name/) (attribute)
- [`session.references`](/en/tmux/3.2a/reference/c-struct-session-references/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
