[channels,printer] Ignore printer settings

only remember printer configuration data, ignore driver and port
settings
This commit is contained in:
akallabeth
2025-03-14 12:54:08 +01:00
parent 618139c7a1
commit 139ee263f1

View File

@@ -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)