Merge branch 'misc-fixes'
This commit is contained in:
commit
c77fd899a1
7 changed files with 17 additions and 13 deletions
|
@ -332,7 +332,7 @@ void WINAPI tdInit(void) {
|
|||
* @since Version 2.0.0
|
||||
**/
|
||||
int WINAPI tdRegisterDeviceEvent( TDDeviceEvent eventFunction, void *context ) {
|
||||
eventFunction; Client *client = Client::getInstance();
|
||||
Client *client = Client::getInstance();
|
||||
return client->registerEvent( CallbackStruct::DeviceEvent, (void *)eventFunction, context );
|
||||
}
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ char * WINAPI tdGetErrorString(int intErrorNo) {
|
|||
"Received an unknown response",
|
||||
"Syntax error",
|
||||
"Broken pipe"
|
||||
"An error occured while communicating with the Telldus Service"
|
||||
"An error occurred while communicating with the Telldus Service"
|
||||
};
|
||||
std::string strReturn;
|
||||
intErrorNo = abs(intErrorNo); //We don't use negative values here.
|
||||
|
|
|
@ -39,7 +39,7 @@ std::wstring TelldusCore::charToWstring(const char *value) {
|
|||
size_t outbytesLeft = utf8Length*sizeof(wchar_t);
|
||||
|
||||
//Copy the instring
|
||||
char *inString = new char[strlen(value)+1];
|
||||
char *inString = new char[utf8Length+1];
|
||||
strcpy(inString, value);
|
||||
|
||||
//Create buffer for output
|
||||
|
|
|
@ -199,9 +199,10 @@ void ControllerManager::loadStoredControllers() {
|
|||
int id = d->settings.getNodeId(Settings::Controller, i);
|
||||
d->controllers[id].controller = NULL;
|
||||
d->controllers[id].name = d->settings.getName(Settings::Controller, id);
|
||||
d->controllers[id].type = d->settings.getControllerType(id);
|
||||
const int type = d->settings.getControllerType(id);
|
||||
d->controllers[id].type = type;
|
||||
d->controllers[id].serial = d->settings.getControllerSerial(id);
|
||||
signalControllerEvent(id, TELLSTICK_DEVICE_ADDED, 0, L"");
|
||||
signalControllerEvent(id, TELLSTICK_DEVICE_ADDED, type, L"");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) {
|
|||
argp_usage (state);
|
||||
|
||||
case ARGP_KEY_ARG:
|
||||
if (state->next == state->argc) {
|
||||
argp_usage (state);
|
||||
}
|
||||
command = arg;
|
||||
action = state->argv[state->next];
|
||||
state->next = state->argc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue