COM-48 Implement timeout, and signal the app to poll inbox faster when waiting
authorMarkus Schaber <markus@pep-security.net>
Fri, 03 Feb 2017 21:30:26 +0100
changeset 23327848ed0067c
parent 232 4c6d44bed519
child 234 a3cc1847d197
COM-48 Implement timeout, and signal the app to poll inbox faster when waiting
on KeySync queue with a timeout.

Fix two typos.

Explicitly declare implemented interfaces (All that code generator and
preprocessor black magic, and still, everything needs to be declared by hand.)
CpEpEngine.cpp
CpEpEngine.h
     1.1 --- a/CpEpEngine.cpp	Wed Feb 01 21:37:07 2017 +0100
     1.2 +++ b/CpEpEngine.cpp	Fri Feb 03 21:30:26 2017 +0100
     1.3 @@ -12,7 +12,8 @@
     1.4  {
     1.5  	static const IID* const arr[] =
     1.6  	{
     1.7 -		&IID_IpEpEngine
     1.8 +		&IID_IpEpEngine,
     1.9 +        &IID_IpEpEngine2,
    1.10  	};
    1.11  
    1.12  	for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
    1.13 @@ -1224,14 +1225,14 @@
    1.14          && me->client_last_signalled_polling_state == false)
    1.15      {
    1.16          me->client_callbacks2_on_sync_thread->NeedFastPolling(VARIANT_TRUE);
    1.17 -        me->client_last_signalled_polling_state == true;
    1.18 +        me->client_last_signalled_polling_state = true;
    1.19      }
    1.20      else if (!(timeout && *timeout)
    1.21          && me->client_callbacks2_on_sync_thread
    1.22          && me->client_last_signalled_polling_state == true)
    1.23      {
    1.24          me->client_callbacks2_on_sync_thread->NeedFastPolling(VARIANT_FALSE);
    1.25 -        me->client_last_signalled_polling_state == false;
    1.26 +        me->client_last_signalled_polling_state = false;
    1.27      }
    1.28  
    1.29  	// acquire the lock
     2.1 --- a/CpEpEngine.h	Wed Feb 01 21:37:07 2017 +0100
     2.2 +++ b/CpEpEngine.h	Fri Feb 03 21:30:26 2017 +0100
     2.3 @@ -52,6 +52,7 @@
     2.4  
     2.5  BEGIN_COM_MAP(CpEpEngine)
     2.6      COM_INTERFACE_ENTRY(IpEpEngine)
     2.7 +    COM_INTERFACE_ENTRY(IpEpEngine2)
     2.8      COM_INTERFACE_ENTRY(ISupportErrorInfo)
     2.9  END_COM_MAP()
    2.10