Fixed compile warning in GetEvent demo.

This commit is contained in:
skarg
2015-06-28 20:49:48 +00:00
parent 8c17721dcd
commit 89bbfbb2ab
+7 -5
View File
@@ -217,8 +217,8 @@ int main(int argc, char *argv[])
last_seconds = time(NULL); last_seconds = time(NULL);
timeout_seconds = (apdu_timeout() / 1000) * apdu_retries(); timeout_seconds = (apdu_timeout() / 1000) * apdu_retries();
/* try to bind with the device */ /* try to bind with the device */
found = address_bind_request(Target_Device_Object_Instance, found = address_bind_request(Target_Device_Object_Instance,
&max_apdu, &max_apdu,
&Target_Address); &Target_Address);
if (!found) { if (!found) {
Send_WhoIs(Target_Device_Object_Instance, Target_Device_Object_Instance); Send_WhoIs(Target_Device_Object_Instance, Target_Device_Object_Instance);
@@ -248,9 +248,11 @@ int main(int argc, char *argv[])
Request_Invoke_ID = Send_GetEvent(&Target_Address, Request_Invoke_ID = Send_GetEvent(&Target_Address,
&LastReceivedObjectIdentifier); &LastReceivedObjectIdentifier);
More_Events = false; More_Events = false;
} else if (tsm_invoke_id_free(Request_Invoke_ID)) } else if (tsm_invoke_id_free(Request_Invoke_ID)) {
if (Recieved_Ack) break; if (Recieved_Ack) {
else if (tsm_invoke_id_failed(Request_Invoke_ID)) { break;
}
} else if (tsm_invoke_id_failed(Request_Invoke_ID)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n"); fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(Request_Invoke_ID); tsm_free_invoke_id(Request_Invoke_ID);
Error_Detected = true; Error_Detected = true;