diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index c9516e93b..5f427a16a 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -160,15 +160,24 @@ static BOOL printer_read_setting(const char* path, prn_conf_t type, void** data, DWORD highSize = 0; DWORD read = 0; BOOL rc = FALSE; - HANDLE file = NULL; char* fdata = NULL; const char* name = filemap[type]; - char* abs = GetCombinedPath(path, name); + switch (type) + { + case PRN_CONF_DATA: + break; + default: + WLog_DBG(TAG, "Printer option %s ignored", name); + return FALSE; + } + + char* abs = GetCombinedPath(path, name); if (!abs) return FALSE; - file = CreateFileA(abs, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE file = + CreateFileA(abs, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); free(abs); if (file == INVALID_HANDLE_VALUE)