fix bug with uninitialized variable

This commit is contained in:
Chris Cromer 2020-08-06 23:59:27 -04:00
parent 95663e461b
commit 5c4f67ad80
Signed by: cromer
GPG Key ID: 39CC813FF3C8708A

View File

@ -178,6 +178,7 @@ namespace TUFManager {
* @return Returns 0 on success or an error code if failure * @return Returns 0 on success or an error code if failure
*/ */
private int _command_line (ApplicationCommandLine command_line) { private int _command_line (ApplicationCommandLine command_line) {
settings = new Settings ("org.tuf.manager");
try { try {
connect_tuf_server (); connect_tuf_server ();
} }
@ -401,7 +402,7 @@ namespace TUFManager {
#else #else
try { try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE); pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
Timeout.add (200, () => { Timeout.add_seconds (10, () => {
int mode = fan_mode; int mode = fan_mode;
tuf_server.procedure_finished.connect (release_cli); tuf_server.procedure_finished.connect (release_cli);
set_fan_mode (mode); set_fan_mode (mode);
@ -426,7 +427,7 @@ namespace TUFManager {
try { try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE); pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
Timeout.add (200, () => { Timeout.add_seconds (10, () => {
int mode = keyboard_mode; int mode = keyboard_mode;
tuf_server.procedure_finished.connect (release_cli); tuf_server.procedure_finished.connect (release_cli);
set_keyboard_mode (mode); set_keyboard_mode (mode);
@ -450,7 +451,7 @@ namespace TUFManager {
try { try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE); pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
Timeout.add (200, () => { Timeout.add_seconds (10, () => {
int set_speed = keyboard_speed; int set_speed = keyboard_speed;
tuf_server.procedure_finished.connect (release_cli); tuf_server.procedure_finished.connect (release_cli);
set_keyboard_speed (set_speed); set_keyboard_speed (set_speed);
@ -473,7 +474,7 @@ namespace TUFManager {
try { try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE); pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
Timeout.add (200, () => { Timeout.add_seconds (10, () => {
tuf_server.procedure_finished.connect (release_cli); tuf_server.procedure_finished.connect (release_cli);
set_keyboard_color (rgba); set_keyboard_color (rgba);
settings.set_string ("keyboard-color", rgba.to_string ()); settings.set_string ("keyboard-color", rgba.to_string ());