diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-21 19:56:41 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-21 19:56:41 +0300 |
| commit | d0e6c34ed07d332c070fa6387e36bc1e517d486f (patch) | |
| tree | d56df71ed585496562e85e88505f5a02d065870f /libguile-ssh/log.c | |
| parent | log.c (_gssh_log_error): New procedure (diff) | |
| download | guile-ssh-d0e6c34ed07d332c070fa6387e36bc1e517d486f.tar.gz | |
log.c (_gssh_log_warning): New procedure
* libguile-ssh/log.c (_gssh_log_warning): New procedure.
* libguile-ssh/log.h: Likewise.
* libguile-ssh/channel-func.c (guile_ssh_channel_get_exit_status): Issue a
warning if 'ssh_channel_get_exit_status' failed to get the exit status.
Diffstat (limited to 'libguile-ssh/log.c')
| -rw-r--r-- | libguile-ssh/log.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libguile-ssh/log.c b/libguile-ssh/log.c index c631306..6588749 100644 --- a/libguile-ssh/log.c +++ b/libguile-ssh/log.c @@ -255,6 +255,21 @@ _gssh_log_error (const char* function_name, const char* msg, SCM args) scm_dynwind_end (); } +void +_gssh_log_warning (const char* function_name, const char* msg, SCM args) +{ + char *c_str; + scm_dynwind_begin (0); + + c_str = scm_to_locale_string (scm_object_to_string (args, SCM_UNDEFINED)); + scm_dynwind_free (c_str); + + _ssh_log (SSH_LOG_WARNING, function_name, "[GSSH WARNING] %s: %s", + msg, c_str); + + scm_dynwind_end (); +} + /* Initialization */ |
