<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qt-license-service.git/src/libs, branch dev</title>
<subtitle>The Qt License Service is a gateway between Qt License Server and Qt developer tools (i.e. Qt Creator and Qt Design Studio)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/'/>
<entry>
<title>Fix of  a bug where daemon grants non-valid license</title>
<updated>2023-04-19T11:36:08+00:00</updated>
<author>
<name>Sami Littow</name>
<email>sami.littow@qt.io</email>
</author>
<published>2023-04-14T05:54:38+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=481ae1cb9e52dfe198030e9a4a6e562005f04ca7'/>
<id>481ae1cb9e52dfe198030e9a4a6e562005f04ca7</id>
<content type='text'>
(clitoolhandler.h)
- Server response validity was only checked when requesting longterm reservation
- Could have exploited with telnet
- Server response JSON status field check moved to the beginning of method

(HttpClient, Licenser classes)
- Pass the REST endpoint to the HTTP client per request, rather than
  trying to guess it in HTTP client

Change-Id: I13d05b33f1032a91d393e7315552f1b9d391142d
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(clitoolhandler.h)
- Server response validity was only checked when requesting longterm reservation
- Could have exploited with telnet
- Server response JSON status field check moved to the beginning of method

(HttpClient, Licenser classes)
- Pass the REST endpoint to the HTTP client per request, rather than
  trying to guess it in HTTP client

Change-Id: I13d05b33f1032a91d393e7315552f1b9d391142d
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Windows build</title>
<updated>2023-04-19T09:26:53+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-04-14T12:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=b8e7c76ea05ab2ab1dbec0efe547ee2ff259e374'/>
<id>b8e7c76ea05ab2ab1dbec0efe547ee2ff259e374</id>
<content type='text'>
Add missing cast and only include pthread lib on Unix platforms.

Change-Id: I0c40edb5b97ab80fbed126d332b661dcfdb2fb79
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing cast and only include pthread lib on Unix platforms.

Change-Id: I0c40edb5b97ab80fbed126d332b661dcfdb2fb79
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup: remove commented out code</title>
<updated>2023-04-13T12:40:09+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-04-12T10:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=cda096486013d2f5ab39f0a2fd86235ef27fc67c'/>
<id>cda096486013d2f5ab39f0a2fd86235ef27fc67c</id>
<content type='text'>
Change-Id: Id5253f628acc7823fcf697a1115cd13952d2125d
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Id5253f628acc7823fcf697a1115cd13952d2125d
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix issues caused by invoking exit() on non-main thread</title>
<updated>2023-04-13T12:40:02+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-04-05T14:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=f5055dd810d50feb81d4b4a5553b7199d877f5fc'/>
<id>f5055dd810d50feb81d4b4a5553b7199d877f5fc</id>
<content type='text'>
These could cause unpredictable behavior, resulting in crashes
if the daemon would be started twice, trying to bind the TCP
server socket to an address with already taken port, etc.

Fix by:

- Add generic runtime exception class for daemon thrown errors.

- Replace exit() calls that could occur on non-main thread with
  throwing the new exception.

- Add test case failing without the fix.

Change-Id: I5cfe679bdd9a034b1913edf30be00acfe3f3232c
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These could cause unpredictable behavior, resulting in crashes
if the daemon would be started twice, trying to bind the TCP
server socket to an address with already taken port, etc.

Fix by:

- Add generic runtime exception class for daemon thrown errors.

- Replace exit() calls that could occur on non-main thread with
  throwing the new exception.

- Add test case failing without the fix.

Change-Id: I5cfe679bdd9a034b1913edf30be00acfe3f3232c
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix segmentation fault after sending SIGINT signal</title>
<updated>2023-04-13T12:39:58+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-04-05T09:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=35f678a084503bac03c6d466fd9265d003c5545a'/>
<id>35f678a084503bac03c6d466fd9265d003c5545a</id>
<content type='text'>
In case the daemon had not served any clients, the Licenser::
m_currentClient pointer was initialized into undefined value,
and was deleted unconditionally on the class destructor, causing
a segfault.

Instead of keeping the pointer as class member, only store the
managed client handler object in the scope of Licenser::listen().
Floating clients are then moved into runtime storage, either directly
or under respective parents, and site license clients should be
destroyed after they are handled.

This fixes the above mentioned issue, and also prevents leaking of
consequent site license clients after the first one.

Also add a simple test case.

Task-number: QLS-285
Change-Id: Ife58207a3a8598590c6755d5e03c218172d35d36
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case the daemon had not served any clients, the Licenser::
m_currentClient pointer was initialized into undefined value,
and was deleted unconditionally on the class destructor, causing
a segfault.

Instead of keeping the pointer as class member, only store the
managed client handler object in the scope of Licenser::listen().
Floating clients are then moved into runtime storage, either directly
or under respective parents, and site license clients should be
destroyed after they are handled.

This fixes the above mentioned issue, and also prevents leaking of
consequent site license clients after the first one.

Also add a simple test case.

Task-number: QLS-285
Change-Id: Ife58207a3a8598590c6755d5e03c218172d35d36
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add foundation for auto-tests</title>
<updated>2023-04-13T10:55:42+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-01-18T06:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=0aab71e69ce0a413d7ebb79496bffc5fee030755'/>
<id>0aab71e69ce0a413d7ebb79496bffc5fee030755</id>
<content type='text'>
- 3rdparty: integrate amalgamated distribution of Catch2 v3.3.0
  unit test framework into projects source tree and build.

- Adjust and add CMakeLists.txt files for building and running
  automated tests. The build target for running the tests on
  Linux is 'make test'. Building of the tests can be skipped
  with '-DBUILD_TESTS=off' setting.

- Make commonsetup.h a header that is configured by cmake, to
  support variable substitions. Move enums and structs from the
  old file to new headers, to reserve the input header file for
  the '#define' and '#cmakedefine' preprocessor directives.

  This is done to expose the default settings file path for the
  auto tests.

- Add simple test case for demonstrating running the daemon
  and a client tool in test code.

Task-number: QLS-239
Change-Id: I2706111e81f16926d4983f0fc772561c67dd874e
Reviewed-by: Sami Littow &lt;sami.littow@qt.io&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 3rdparty: integrate amalgamated distribution of Catch2 v3.3.0
  unit test framework into projects source tree and build.

- Adjust and add CMakeLists.txt files for building and running
  automated tests. The build target for running the tests on
  Linux is 'make test'. Building of the tests can be skipped
  with '-DBUILD_TESTS=off' setting.

- Make commonsetup.h a header that is configured by cmake, to
  support variable substitions. Move enums and structs from the
  old file to new headers, to reserve the input header file for
  the '#define' and '#cmakedefine' preprocessor directives.

  This is done to expose the default settings file path for the
  auto tests.

- Add simple test case for demonstrating running the daemon
  and a client tool in test code.

Task-number: QLS-239
Change-Id: I2706111e81f16926d4983f0fc772561c67dd874e
Reviewed-by: Sami Littow &lt;sami.littow@qt.io&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Licenser: remove unused member function declarations</title>
<updated>2023-04-13T10:22:10+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-03-29T13:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=57d22caff7878fd8c4335ce61095b72bf633656d'/>
<id>57d22caff7878fd8c4335ce61095b72bf633656d</id>
<content type='text'>
Change-Id: I357bd9595efb09422a2ff182c05e958086400e1f
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I357bd9595efb09422a2ff182c05e958086400e1f
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow configurable path for the daemon and user settings files</title>
<updated>2023-04-13T10:22:04+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-03-01T13:59:27+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=07775d482dce7cc7c364bd43fb09d214acdc6d7d'/>
<id>07775d482dce7cc7c364bd43fb09d214acdc6d7d</id>
<content type='text'>
This is a prerequisite for mocking the daemon in test code, where we
cannot expect the daemon is installed into its standard directory.

Also prefix the Licenser's settings object to indicate it's
a member of the class.

Change-Id: I53b0d668105258e283575307d9f957ffcc3818c2
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a prerequisite for mocking the daemon in test code, where we
cannot expect the daemon is installed into its standard directory.

Also prefix the Licenser's settings object to indicate it's
a member of the class.

Change-Id: I53b0d668105258e283575307d9f957ffcc3818c2
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2023-04-12T10:45:47+00:00</updated>
<author>
<name>Iikka Eklund</name>
<email>iikka.eklund@qt.io</email>
</author>
<published>2023-04-12T09:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=e04ab834f711320bcec9389633f752b67d2ca8f8'/>
<id>e04ab834f711320bcec9389633f752b67d2ca8f8</id>
<content type='text'>
Lets keep the copyright years correct.

Change-Id: I50eaa5d53831862940e8c33c011c5a88ad9ff76f
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lets keep the copyright years correct.

Change-Id: I50eaa5d53831862940e8c33c011c5a88ad9ff76f
Reviewed-by: Arttu Tarkiainen &lt;arttu.tarkiainen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor for asynchronous running of the Licenser object</title>
<updated>2023-03-22T07:59:07+00:00</updated>
<author>
<name>Arttu Tarkiainen</name>
<email>arttu.tarkiainen@qt.io</email>
</author>
<published>2023-01-31T09:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qt-license-service.git/commit/?id=1510f564111ea06afebd9287544d12334974c816'/>
<id>1510f564111ea06afebd9287544d12334974c816</id>
<content type='text'>
Add new AsyncTask class template, and derived LicenseService class,
which may be used to run the Licenser instance (core object of the
license service) in a separate thread, with asynchronous starting,
stopping and querying the status of the service. Add signal
interception for SIGINT and SIGTERM to handle graceful thread
synchronization and shutdown.

This makes it more straightforward to run and verify status of the
license service from test cases where it is required to have both
the daemon and a client running simultaneously. Previously the
daemon would have blocked the main thread in tests while listening
to the TCP socket.

The starting point for the Windows service is not yet adjusted to
use the new LicenseService class, and runs the Licenser object's
listener loop in the main thread as before.

Change-Id: I58ae1997264df7dd829c7533a4e2ca97e7f84edd
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new AsyncTask class template, and derived LicenseService class,
which may be used to run the Licenser instance (core object of the
license service) in a separate thread, with asynchronous starting,
stopping and querying the status of the service. Add signal
interception for SIGINT and SIGTERM to handle graceful thread
synchronization and shutdown.

This makes it more straightforward to run and verify status of the
license service from test cases where it is required to have both
the daemon and a client running simultaneously. Previously the
daemon would have blocked the main thread in tests while listening
to the TCP socket.

The starting point for the Windows service is not yet adjusted to
use the new LicenseService class, and runs the Licenser object's
listener loop in the main thread as before.

Change-Id: I58ae1997264df7dd829c7533a4e2ca97e7f84edd
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Iikka Eklund &lt;iikka.eklund@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
