Skip to content

Commit

Permalink
Allow scan tickets without intent
Browse files Browse the repository at this point in the history
  • Loading branch information
SimulPiscator committed Nov 4, 2023
1 parent e49b8b3 commit d4b0f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/scanjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ ScanJob::Private::init(const ScanSettingsXml& settings, bool autoselectFormat, c

mIntent = settings.getString("Intent");
if (mIntent.empty())
err = PWG_INVALID_SCAN_TICKET;
mIntent = "Photo";

double res_dpi = settings.getNumber("XResolution");
if (res_dpi != settings.getNumber("YResolution"))
if (!std::isnan(res_dpi) && res_dpi != settings.getNumber("YResolution"))
err = PWG_INVALID_SCAN_TICKET;
res_dpi = ::floor(res_dpi + 0.5);

Expand Down

0 comments on commit d4b0f7b

Please sign in to comment.