GUAC-1452: Log typescript creation/failure.
This commit is contained in:
parent
c68f96741d
commit
d9dacedbe0
@ -37,6 +37,7 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "typescript.h"
|
#include "typescript.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -1841,8 +1842,22 @@ int guac_terminal_create_typescript(guac_terminal* term, const char* path,
|
|||||||
/* Create typescript */
|
/* Create typescript */
|
||||||
term->typescript = guac_terminal_typescript_alloc(path, name, create_path);
|
term->typescript = guac_terminal_typescript_alloc(path, name, create_path);
|
||||||
|
|
||||||
/* Typescript creation failed if NULL */
|
/* Log failure */
|
||||||
return term->typescript == NULL;
|
if (term->typescript == NULL) {
|
||||||
|
guac_client_log(term->client, GUAC_LOG_ERROR,
|
||||||
|
"Creation of typescript failed: %s", strerror(errno));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If typescript was successfully created, log filenames */
|
||||||
|
guac_client_log(term->client, GUAC_LOG_INFO,
|
||||||
|
"Typescript of terminal session will be saved to \"%s\". "
|
||||||
|
"Timing file is \"%s\".",
|
||||||
|
term->typescript->data_filename,
|
||||||
|
term->typescript->timing_filename);
|
||||||
|
|
||||||
|
/* Typescript creation succeeded */
|
||||||
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user