Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/travis ci #105

Merged
merged 17 commits into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removing forcing lowercase service names
  • Loading branch information
dcalvoalonso committed Dec 19, 2017
commit 70f8484cc90c54e0e4b8a19ad3ba97e3db2b98aa
6 changes: 3 additions & 3 deletions lib/services/lwm2mHandlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function mapConfig(device, configuration, callback) {
id: device.name,
name: device.name + ':' + device.type,
type: device.type,
service: configuration.service.toLowerCase(),
service: configuration.service,
subservice: configuration.subservice,
lazy: configuration.lazy,
attributes: configuration.attributes,
Expand Down Expand Up @@ -108,7 +108,7 @@ function findConfiguration(device, callback) {
finalConfiguration = commons.getConfig().ngsi.types[device.type];
} else if (commons.getConfig().ngsi.service && commons.getConfig().ngsi.subservice) {
finalConfiguration = {};
finalConfiguration.service = commons.getConfig().ngsi.service.toLowerCase();
finalConfiguration.service = commons.getConfig().ngsi.service;
finalConfiguration.subservice = commons.getConfig().ngsi.subservice;
}
else if (device.type) {
Expand Down Expand Up @@ -277,7 +277,7 @@ function registrationHandler(endpoint, lifetime, version, binding, payload, call
} else {
iotAgentLib.getDevice(
lwm2mDevice.name,
configuration.service.toLowerCase(),
configuration.service,
configuration.subservice, function(error, ngsiDevice) {
if (error && error.name && error.name === 'DEVICE_NOT_FOUND') {
logger.debug(context, 'Device register not found. Creating new device.');
Expand Down
2 changes: 1 addition & 1 deletion lib/services/lwm2mHandlers/unregistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function unregistrationHandler(device, callback) {
} else {
iotAgentLib.unregister(
device.name,
(configuration.service).toLowerCase(),
configuration.service,
configuration.subservice,
callback);
}
Expand Down