Skip to content

Commit

Permalink
dump path constants
Browse files Browse the repository at this point in the history
  • Loading branch information
gammelby committed Dec 2, 2024
1 parent c80c6a8 commit 633d1d5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/modules/iam/coap_handler/nm_iam_pairing_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,22 @@ static const char* LOGM = "iam";

static void handle_request(struct nm_iam_coap_handler* handler, NabtoDeviceCoapRequest* request);

static void print_path3(const char** path) {
const char* pathSegments = *path;
printf("VBOX_DEBUG_3 - path: [");
while (pathSegments) {
printf("%s/", pathSegments);
path++;
pathSegments = *path;
}
printf("]\n");
}

NabtoDeviceError nm_iam_pairing_get_init(struct nm_iam_coap_handler* handler, NabtoDevice* device, struct nm_iam* iam)
{
const char* paths[] = { "iam", "pairing", NULL };
printf("VBOX_DEBUG_3: GET /iam/pairing\n");
print_path3(paths);
NN_LOG_TRACE(iam->logger, LOGM, "initializing GET /iam/pairing; &handle_request=%p", &handle_request);
return nm_iam_coap_handler_init(handler, device, iam, NABTO_DEVICE_COAP_GET, paths, &handle_request);
}
Expand Down
13 changes: 13 additions & 0 deletions src/modules/iam/coap_handler/nm_iam_settings_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,22 @@ static const char* LOGM = "iam";

static void handle_request(struct nm_iam_coap_handler* handler, NabtoDeviceCoapRequest* request);

static void print_path4(const char** path) {
const char* pathSegments = *path;
printf("VBOX_DEBUG_4 - path: [");
while (pathSegments) {
printf("%s/", pathSegments);
path++;
pathSegments = *path;
}
printf("]\n");
}

NabtoDeviceError nm_iam_settings_get_init(struct nm_iam_coap_handler* handler, NabtoDevice* device, struct nm_iam* iam)
{
const char* paths[] = { "iam", "settings", NULL };
printf("VBOX_DEBUG_4: GET /iam/settings\n");
print_path4(paths);
NN_LOG_TRACE(iam->logger, LOGM, "initializing GET /iam/settings; &handle_request=%p", &handle_request);
return nm_iam_coap_handler_init(handler, device, iam, NABTO_DEVICE_COAP_GET, paths, &handle_request);
}
Expand Down

0 comments on commit 633d1d5

Please sign in to comment.