This commit is contained in:
skarg
2006-08-29 10:48:04 +00:00
parent 0f851d57f0
commit 3d0abf778a
25 changed files with 487 additions and 525 deletions
+6 -8
View File
@@ -259,18 +259,16 @@ int main(int argc, char *argv[])
Communication_Password);
} else if (tsm_invoke_id_free(invoke_id))
break;
else if (tsm_invoke_id_failed(invoke_id))
{
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
}
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
printf("\rError: APDU Timeout!\r\n");
break;
}
+6 -9
View File
@@ -285,19 +285,16 @@ int main(int argc, char *argv[])
Target_File_Object_Instance, fileStartPosition,
requestedOctetCount);
Current_Invoke_ID = invoke_id;
}
else if (tsm_invoke_id_failed(invoke_id))
{
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
} else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
}
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
fprintf(stderr, "\rError: APDU Timeout!\r\n");
break;
}
+3 -5
View File
@@ -187,7 +187,7 @@ int main(int argc, char *argv[])
if (!arcnet_init("arc0"))
return 1;
#else
#error Datalink (BACDL_ETHERNET,BACDL_BIP, or BACDL_ARCNET) undefined
#error Datalink (BACDL_ETHERNET,BACDL_BIP, or BACDL_ARCNET) undefined
#endif
/* configure the timeout values */
last_seconds = time(NULL);
@@ -226,8 +226,7 @@ int main(int argc, char *argv[])
Target_Object_Index);
} else if (tsm_invoke_id_free(invoke_id))
break;
else if (tsm_invoke_id_failed(invoke_id))
{
else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
@@ -236,8 +235,7 @@ int main(int argc, char *argv[])
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
printf("\rError: APDU Timeout!\r\n");
break;
}
+6 -8
View File
@@ -245,18 +245,16 @@ int main(int argc, char *argv[])
Reinitialize_Password);
} else if (tsm_invoke_id_free(invoke_id))
break;
else if (tsm_invoke_id_failed(invoke_id))
{
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
}
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
fprintf(stderr, "\rError: APDU Timeout!\r\n");
break;
}
+2 -2
View File
@@ -112,10 +112,10 @@ int main(int argc, char *argv[])
/* allow the device ID to be set */
if (argc > 1)
Device_Set_Object_Instance_Number(strtol(argv[1], NULL, 0));
#if defined(BACDL_BIP)
#if defined(BACDL_BIP)
if (argc > 2)
bip_set_port(strtol(argv[2], NULL, 0));
#endif
#endif
printf("BACnet Server Demo - Device #%u\r\n",
Device_Object_Instance_Number());
Init_Service_Handlers();
+6 -9
View File
@@ -263,19 +263,16 @@ int main(int argc, char *argv[])
Target_File_Object_Instance, fileStartPosition,
&fileData);
Current_Invoke_ID = invoke_id;
}
else if (tsm_invoke_id_failed(invoke_id))
{
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
} else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
break;
}
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
fprintf(stderr, "\rError: APDU Timeout!\r\n");
break;
}
+2 -4
View File
@@ -323,8 +323,7 @@ int main(int argc, char *argv[])
Target_Object_Property_Index);
} else if (tsm_invoke_id_free(invoke_id))
break;
else if (tsm_invoke_id_failed(invoke_id))
{
else if (tsm_invoke_id_failed(invoke_id)) {
fprintf(stderr, "\rError: TSM Timeout!\r\n");
tsm_free_invoke_id(invoke_id);
/* try again or abort? */
@@ -333,8 +332,7 @@ int main(int argc, char *argv[])
} else {
/* increment timer - exit if timed out */
elapsed_seconds += (current_seconds - last_seconds);
if (elapsed_seconds > timeout_seconds)
{
if (elapsed_seconds > timeout_seconds) {
printf("\rError: APDU Timeout!\r\n");
break;
}