Browse Source

Fixed timeout handling in retrieve_next_sync_msg

JNI-44
Edouard Tisserant 9 years ago
parent
commit
a8d39cecdc
  1. 4
      src/org_pEp_jniadapter_AbstractEngine.cc

4
src/org_pEp_jniadapter_AbstractEngine.cc

@ -276,7 +276,7 @@ extern "C" {
time_t now, end;
void *msg;
if(*timeout == 0){
if(timeout && *timeout != 0){
now = time(NULL);
end = now + *timeout;
}
@ -285,7 +285,7 @@ extern "C" {
// TODO: add blocking dequeue
usleep(100000);
if(*timeout == 0){
if(timeout && *timeout != 0){
now = time(NULL);
if(now > end)
return NULL;

Loading…
Cancel
Save