Commit graph

2229 commits

Author SHA1 Message Date
Micke Prag
2cb1a2ac97 Set the flag O_CLOEXEC on all file handles so they don't interferes with the execution of scripts. See #100 2012-12-04 17:28:49 +01:00
Micke Prag
3441b9cc45 Missing username in TODO according to Google style guidelines "readability/todo" 2012-12-04 17:25:17 +01:00
Micke Prag
6136c16d83 Use static_cast<int>(...) instead of C-style cast [readability/casting] 2012-12-04 17:16:06 +01:00
Micke Prag
2399e6c349 All parameters should be named in a function [readability/function] 2012-12-04 17:08:47 +01:00
Micke Prag
01a65acdd6 Do not use namespace using-directives according to Google style guidelines "build/namespaces" 2012-12-04 16:56:44 +01:00
Micke Prag
81946e9887 Find Python dynamically so it works on Windows too 2012-12-04 16:41:31 +01:00
Stefan Persson
7d0f3747fe Include directory when naming .h files, according to Google style guidelines "build/include" 2012-12-04 16:39:39 +01:00
Stefan Persson
d5e8c1f941 Adding copyright messages according to Google style guidelines "legal/copyright" 2012-12-04 16:10:17 +01:00
Stefan Persson
05197abf6e Fixed regression errors for windows 2012-12-04 15:14:40 +01:00
Stefan Persson
9f68c2083a Some code/comment cleanup 2012-12-04 15:05:45 +01:00
Stefan Persson
9d39fe8d47 Merged with Windows_service_fixes 2012-12-04 15:01:46 +01:00
Stefan Persson
df6bd27883 More logging for TelldusService debug, ticket #266, 266-1. 2012-12-04 11:34:06 +01:00
Micke Prag
e5f6858cf5 Cleanup our new environment after its use 2012-11-22 13:10:11 +01:00
Micke Prag
15225dd5f6 Cleanup the logger before exit 2012-11-22 13:10:10 +01:00
Micke Prag
46c24d4a6e Make the path for the scripts configurable 2012-11-22 13:10:10 +01:00
Micke Prag
fac773249c Rename SettingsConfusePath.h to config.h so it can be used by other configurable options 2012-11-22 13:10:10 +01:00
Micke Prag
b2948cba5b Preload all scripts to execute on startup to avoid scanning the
directory on every event.
2012-11-22 13:10:10 +01:00
Micke Prag
d48ee1f02b Execute a script from /usr/local/share/telldus/scripts on all events.
Closes #100
2012-11-22 13:09:59 +01:00
Micke Prag
32f2d9f955 Check all incomming messages against duplicates. Only one unique message
per second is accepted. Closes #84
2012-11-19 16:42:18 +01:00
Micke Prag
0018ad28d1 Remove old telldus-gui.pro 2012-11-19 10:14:09 +01:00
Micke Prag
d88d5a5098 Remove empty lines according to google style guidelines 2012-11-08 15:40:31 +01:00
Micke Prag
4467a75abc Cleanup our CF variables so we do not leak memory. See #240 2012-11-08 10:49:04 +01:00
Micke Prag
992b03c5ba Code cleanup according to style guidelines 2012-11-08 10:36:50 +01:00
Micke Prag
fd8fdfcacd Remove variables never used 2012-11-08 10:13:59 +01:00
Micke Prag
c3bcd64246 Queue all device commands and execute them from the main thread.
By queueing all commands the client library will return immediately and all
executed commands will not block any more. This is benificial for applications
that calls the api using the same thread as the ui thread. For instance groups
could before take several seconds to execute and the application would freeze in
the meantime. If the time to execute was longer than the timeout between
telldus-core and telldusd other nasty stuff like resending the same group up to
20 times could happen.

This change fixes all that with the drawback that we do not really know if the
command was succuessful when returning. We do the best to check all
prerequisites to determine it the call will be successful. Errors like
TELLSTICK_ERROR_COMMUNICATION and TELLSTICK_ERROR_BROKEN_PIPE will not be
reported back to the client. We can still log them though.

This fixes #260. Please reopen if the issue still exists.
2012-11-02 19:52:07 +01:00
Micke Prag
2368b6e564 Add function Device::isMethodSupported()
This function both checks if a method is supported and also "upmask" a method if
it was masked previously.
2012-11-02 16:18:27 +01:00
Micke Prag
35dbc0a980 Report humidity for Oregon 0x1A2D. This closes #221. 2012-11-02 15:03:57 +01:00
Micke Prag
aa16302e1e Add function ControllerManager::count()
This function also rescans the controllers to add new ones if none is
connected.
2012-11-02 13:34:34 +01:00
Micke Prag
d0b1dbba0e Do not unlock the mutex manually since we are using a MutexLocker.
Unlocking a mutex twice seems to cause deadlocks on OS X if we stress the
library. Windows seems unaffected. See #260.
2012-11-02 13:16:34 +01:00
Micke Prag
9d5af14609 Fix some compiler warnings 2012-10-30 15:58:34 +01:00
Micke Prag
4d1fdd777f Comparison of unsigned expression < 0 is always false 2012-10-30 15:58:01 +01:00
Micke Prag
bc777e04ca Add cppunit on OS X as well 2012-09-26 16:43:19 +02:00
Micke Prag
ccc027b381 Update stdlibc_workaround.cpp to our style guidelines 2012-09-26 16:39:05 +02:00
Micke Prag
609f7581ea Update main_mac.cpp to our style guidelines 2012-09-26 16:32:36 +02:00
Micke Prag
c522173296 Update ControllerListener_mac.cpp to our style guidelines 2012-09-26 16:31:27 +02:00
Micke Prag
bc22754f8c Update SettingsCoreFoundationPreferences.cpp to our style guidelines 2012-09-26 16:24:41 +02:00
Micke Prag
f5756e3f93 Update TellStick_ftd2xx.cpp to our style guidelines 2012-09-26 16:16:44 +02:00
Micke Prag
22e8549e7e Follow better the 'Apple Create Rule' for our variables. This fixes a memory leak. Closes #240 2012-09-26 15:05:03 +02:00
Stefan Persson
7ee8407922 Leave read loop on broken pipe 2012-09-03 17:00:17 +02:00
Stefan Persson
0d8bf77a45 Only a lot of debug printouts, but this version is working for SwitchKing at least 2012-09-03 16:59:09 +02:00
Micke Prag
4ff3cfd56c Convert CRLF to LF 2012-08-13 16:45:35 +02:00
Øyvind Saltvik
4065f7dc40 no complier warnings 2012-08-11 18:17:03 +02:00
Øyvind Saltvik
d9ac1d3638 two less warnings 2012-08-11 18:11:23 +02:00
Øyvind Saltvik
420d33b09d don't go off the far end 2012-08-11 16:20:23 +02:00
Øyvind Saltvik
5d2a3a3f7c use tabs 2012-08-10 23:48:42 +02:00
Øyvind Saltvik
d808478ab1 keep track of python function so we can decref it 2012-08-10 23:46:39 +02:00
Øyvind Saltvik
c9588af3c3 make sure errorcodes are returned 2012-08-10 21:41:31 +02:00
Øyvind Saltvik
5cfd91717f return a datetime on success 2012-08-10 21:00:40 +02:00
Øyvind Saltvik
c5c64435cf working examples feature complete 2012-08-10 20:37:16 +02:00
Øyvind Saltvik
9073d60858 working with callbacks 2012-08-10 19:25:24 +02:00