Avoid to give UAToken on WA registration process. We map using the conne... #25

merged 2 commits into from Sep 5, 2012


None yet

3 participants

frsela commented Sep 5, 2012

...ction object


This pull request fails (merged e550d54 into e185523).

@willyaranda willyaranda commented on the diff Sep 5, 2012
@@ -158,7 +158,12 @@ server.prototype = {
case "registerWA":
log.debug("WS::onWSMessage::registerWA --> Application registration message");
var appToken = crypto.hashSHA256(query.data.watoken + query.data.pbkbase64);
- dataManager.registerApplication(appToken, query.data.uatoken, query.data.pbkbase64, function(ok) {
+ if(!dataManager.getUAToken(connection)) {
+ log.error("No UAToken found for this connection !");
willyaranda Sep 5, 2012 Contributor

Apart from logging the error, we need to send with connection.sendUTF() a message to the user to show what happened.

The connection is still closed at the end of the function.

frsela Sep 5, 2012 Member

That's right !

@willyaranda willyaranda merged commit fe0b9fd into telefonicaid:develop Sep 5, 2012

1 check failed

default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment