diff --git a/src/serial_posix.c b/src/serial_posix.c index f4cfa14..d44c51d 100644 --- a/src/serial_posix.c +++ b/src/serial_posix.c @@ -132,6 +132,8 @@ serial_open (serial_t **out, dc_context_t *context, const char* name) if (out == NULL) return -1; // EINVAL (Invalid argument) + INFO (context, "Open: name=%s", name ? name : ""); + // Allocate memory. serial_t *device = (serial_t *) malloc (sizeof (serial_t)); if (device == NULL) { diff --git a/src/serial_win32.c b/src/serial_win32.c index 62cf486..cef0704 100644 --- a/src/serial_win32.c +++ b/src/serial_win32.c @@ -111,6 +111,8 @@ serial_open (serial_t **out, dc_context_t *context, const char* name) if (out == NULL) return -1; // ERROR_INVALID_PARAMETER (The parameter is incorrect) + INFO (context, "Open: name=%s", name ? name : ""); + // Build the device name. const char *devname = NULL; char buffer[MAX_PATH] = "\\\\.\\";