A couple of bugfixes and Microsoft cleanups by Ed
This commit is contained in:
@@ -85,8 +85,21 @@ static void Init_Service_Handlers(
|
||||
/* we need to handle who-is to support dynamic device binding */
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_IS, handler_who_is);
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_HAS, handler_who_has);
|
||||
|
||||
#if 0
|
||||
/* BACnet Testing Observed Incident oi00107
|
||||
Server only devices should not indicate that they EXECUTE I-Am
|
||||
Revealed by BACnet Test Client v1.8.16 ( www.bac-test.com/bacnet-test-client-download )
|
||||
BITS: BIT00040
|
||||
Any discussions can be directed to edward@bac-test.com
|
||||
Please feel free to remove this comment when my changes accepted after suitable time for
|
||||
review by all interested parties. Say 6 months -> September 2016 */
|
||||
/* In this demo, we are the server only ( BACnet "B" device ) so we do not indicate
|
||||
that we can execute the I-Am message */
|
||||
/* handle i-am to support binding to other devices */
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_I_AM, handler_i_am_bind);
|
||||
#endif
|
||||
|
||||
/* set the handler for all the services we don't implement */
|
||||
/* It is required to send the proper reject message... */
|
||||
apdu_set_unrecognized_service_handler_handler
|
||||
@@ -135,13 +148,13 @@ static void Init_Service_Handlers(
|
||||
#endif /* defined(INTRINSIC_REPORTING) */
|
||||
}
|
||||
|
||||
static void print_usage(char *filename)
|
||||
static void print_usage(const char *filename)
|
||||
{
|
||||
printf("Usage: %s [device-instance [device-name]]\n", filename);
|
||||
printf(" [--version][--help]\n");
|
||||
}
|
||||
|
||||
static void print_help(char *filename)
|
||||
static void print_help(const char *filename)
|
||||
{
|
||||
printf("Simulate a BACnet server device\n"
|
||||
"device-instance:\n"
|
||||
@@ -188,7 +201,7 @@ int main(
|
||||
struct uci_context *ctx;
|
||||
#endif
|
||||
int argi = 0;
|
||||
char *filename = NULL;
|
||||
const char *filename = NULL;
|
||||
|
||||
filename = filename_remove_path(argv[0]);
|
||||
for (argi = 1; argi < argc; argi++) {
|
||||
|
||||
Reference in New Issue
Block a user