Changeset 584bc7
- Timestamp:
- 08/16/09 16:03:18 (4 years ago)
- Branches:
- ('master', 'a231b56d57a69513303d0061f5fa3e3cd51c85c1')('controller-upgrade', '72b31cc86eeeef18f1371a3067b6e8a5ca21abfc')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
- Children:
- 528598e862013bc08845c43f10f0e9908711cce4
- Parents:
- c41e5de4f761799a4d41bb05ea8a84d14d0ef9d7
- git-author:
- Micke Prag <micke.prag@telldus.se>2009-08-16 14:03:18+00:00
- git-committer:
- Micke Prag <micke.prag@telldus.se>2009-08-16 14:03:18+00:00
- File:
-
- 1 edited
-
telldus-core/driver/libtelldus-core/Manager.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
telldus-core/driver/libtelldus-core/Manager.cpp
r31d7bb r584bc7 36 36 #define strcasecmp _stricmp 37 37 #endif 38 39 //Defined in telldus-core.cpp 40 extern char *wrapStdString( const std::string &string); 41 38 42 39 43 using namespace TelldusCore; … … 179 183 bool Manager::setDeviceState( int intDeviceId, int intDeviceState, const std::string &strDeviceStateValue ) { 180 184 if (intDeviceState != TELLSTICK_BELL) { 181 return settings.setDeviceState(intDeviceId, intDeviceState, strDeviceStateValue); 185 bool retval = settings.setDeviceState(intDeviceId, intDeviceState, strDeviceStateValue); 186 for(CallbackList::const_iterator callback_it = callbacks.begin(); callback_it != callbacks.end(); ++callback_it) { 187 (*callback_it).event(intDeviceId, intDeviceState, wrapStdString(strDeviceStateValue), (*callback_it).id, (*callback_it).context); 188 } 189 190 return retval; 182 191 } 183 192 return true; … … 240 249 } 241 250 if (found) { 242 //First save the last sent command 251 //First save the last sent command, this also triggers the callback to the client 243 252 setDeviceState(it->first, method, ""); 244 for(CallbackList::const_iterator callback_it = callbacks.begin(); callback_it != callbacks.end(); ++callback_it) {245 (*callback_it).event(it->first, method, message.c_str(), (*callback_it).id, (*callback_it).context);246 }247 253 } 248 254 }
Note: See TracChangeset
for help on using the changeset viewer.
