diff options
Diffstat (limited to 'Swiften')
| -rw-r--r-- | Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp | 10 | ||||
| -rw-r--r-- | Swiften/SASL/WindowsServicePrincipalName.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp b/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp index fa07052..ef3a9b3 100644 --- a/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp +++ b/Swiften/SASL/UnitTest/WindowsServicePrincipalNameTest.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2015 Isode Limited. | 2 | * Copyright (c) 2015-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -97,16 +97,16 @@ class WindowsServicePrincipalNameTest : public CppUnit::TestFixture { | |||
| 97 | WindowsServicePrincipalName spn("adlon.isode.net"); | 97 | WindowsServicePrincipalName spn("adlon.isode.net"); |
| 98 | 98 | ||
| 99 | spn.setInstanceName("mlink.adlon.isode.net"); | 99 | spn.setInstanceName("mlink.adlon.isode.net"); |
| 100 | spn.setInstancePort(6222); | 100 | spn.setInstancePort(55222); |
| 101 | CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net:6222/adlon.isode.net")); | 101 | CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net:55222/adlon.isode.net")); |
| 102 | 102 | ||
| 103 | spn.setInstancePort(0); | 103 | spn.setInstancePort(0); |
| 104 | CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net/adlon.isode.net")); | 104 | CPPUNIT_ASSERT_EQUAL(spn.toString(), std::string("xmpp/mlink.adlon.isode.net/adlon.isode.net")); |
| 105 | 105 | ||
| 106 | WindowsServicePrincipalName spn2("mlink.adlon.isode.net"); | 106 | WindowsServicePrincipalName spn2("mlink.adlon.isode.net"); |
| 107 | 107 | ||
| 108 | spn2.setInstancePort(6222); | 108 | spn2.setInstancePort(55222); |
| 109 | CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net:6222")); | 109 | CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net:55222")); |
| 110 | 110 | ||
| 111 | spn2.setInstancePort(0); | 111 | spn2.setInstancePort(0); |
| 112 | CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net")); | 112 | CPPUNIT_ASSERT_EQUAL(spn2.toString(), std::string("xmpp/mlink.adlon.isode.net")); |
diff --git a/Swiften/SASL/WindowsServicePrincipalName.h b/Swiften/SASL/WindowsServicePrincipalName.h index 4c9f557..2e4e5c4 100644 --- a/Swiften/SASL/WindowsServicePrincipalName.h +++ b/Swiften/SASL/WindowsServicePrincipalName.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2015 Isode Limited. | 2 | * Copyright (c) 2015-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -49,7 +49,7 @@ namespace Swift { | |||
| 49 | * it remain 0 to indicate that the default port is | 49 | * it remain 0 to indicate that the default port is |
| 50 | * used. | 50 | * used. |
| 51 | */ | 51 | */ |
| 52 | void setInstancePort(short int instancePort) { instancePort_ = instancePort; } | 52 | void setInstancePort(unsigned short instancePort) { instancePort_ = instancePort; } |
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * This follows the rules of SPN creation on Windows and | 55 | * This follows the rules of SPN creation on Windows and |
Swift