Commit 76e81874 authored by Vinicius Costa Gomes's avatar Vinicius Costa Gomes Committed by Anas Nashif
Browse files

samples/zoap_client: Make it work with zoap-server



The path and port used by zoap-client were different than the ones used
by zoap-server.

Even if they are different applications, for consistency, it makes sense
for them both to be able to talk to each other.

Change-Id: I883d59c77bc3800b4f0965ba7bcf96a08e545d29
Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
parent 08e0e86b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@

#include <zoap.h>

#define MY_COAP_PORT 9998
#define MY_COAP_PORT 5683

#define STACKSIZE 2000

@@ -46,7 +46,7 @@ struct zoap_pending pendings[NUM_PENDINGS];
struct zoap_reply replies[NUM_REPLIES];
struct nano_delayed_work retransmit_work;

static const char * const a_light_path[] = { "a", "light", NULL };
static const char * const test_path[] = { "test", NULL };

static void msg_dump(const char *s, uint8_t *data, unsigned len)
{
@@ -197,7 +197,7 @@ void main(void)
		return;
	}

	for (p = a_light_path; p && *p; p++) {
	for (p = test_path; p && *p; p++) {
		r = zoap_add_option(&request, ZOAP_OPTION_URI_PATH,
				     *p, strlen(*p));
		if (r < 0) {