Coverage report for server


src/
File: src/commands/message_to_graphicals.c
Date: 2024-06-25 10:57:05
Lines:
8/9
88.9%
Functions:
1/1
100.0%
Branches:
6/8
75.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** zappy
4 ** File description:
5 ** send gui
6 */
7
8 #include "client.h"
9 #include "server.h"
10 #include <stdarg.h>
11
12 37 void message_to_graphicals(server_t *server, char *fmt, ...)
13 {
14 client_list_t *client;
15 37 va_list args;
16
17
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 37 times.
37 if (fmt == NULL)
18 return;
19
2/2
✓ Branch 0 taken 90 times.
✓ Branch 1 taken 37 times.
127 TAILQ_FOREACH(client, &server->clients, entries) {
20
3/4
✓ Branch 0 taken 90 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 89 times.
90 if (client->client && client->client->is_graphic) {
21 1 va_start(args, fmt);
22 1 vdprintf(client->client->fd, fmt, args);
23 1 va_end(args);
24 }
25 }
26 }
27