Bug 400268 - Config file problem "device section invalid"
Summary: Config file problem "device section invalid"
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.0.15
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-24 22:09 UTC by Georg Wild
Modified: 2018-11-05 10:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Wild 2018-10-24 22:09:55 UTC
SUMMARY
Using a DVBs setup, at startup the saved config file config.dvb cannot be reimported.

Reasoning:
1. According to dvbconfig.h, latitude and longitude is int (DvbConfigBase definition)
2. In dvbmanager.cpp/DvbManager::writeDeviceConfigs() the config is written. 
   Using Diseq config the values above are not used and undefined. I got e.g.
   latitude=-1212696649
   longitude=-1212696649
3. Reimported is in dvbmanager.cpp/DvbManager::readDeviceConfigs() with
   config->latitude = reader.readDouble(QLatin1String("latitude"));
   config->longitude = reader.readInt(QLatin1String("longitude"));
4. This results in:
   kaffeine.dvb: Found some problems at .../config.dvb: device section invalid

I don't know what's exactly the reason, probably transform from Double to Int at lat?
At least defining the values 0/0 in config dvb solves the issue!
Comment 1 Mauro Carvalho Chehab 2018-11-05 10:36:08 UTC
Git commit 1e37f68e5a83ac8b24bc2d581ea49162ecd31f9a by Mauro Carvalho Chehab.
Committed on 05/11/2018 at 10:35.
Pushed by mauroc into branch 'master'.

dvbmanager: only read/write longitude/latitude for USALS setup

On DVB-S/S2, latitude and longitude are used only for USALS
setup. It doesn't make sense to save/restore otherwise.

That fixes a bug that would be saving random numbers at
config.dvb.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

M  +8    -4    src/dvb/dvbmanager.cpp

https://commits.kde.org/kaffeine/1e37f68e5a83ac8b24bc2d581ea49162ecd31f9a