Rename Mongoose constants: NS_ -> MG_, NSF_ -> MG_F_

PUBLISHED_FROM=c9cc54df1883aa17606de2b1ffb30f0cd687d037
This commit is contained in:
Sergey Lyubka authored and Sergey Lyubka committed 2015-09-21 15:19:34 +01:00
1 parent 32ab35f61f
commit e1dd3f06fe
41 files changed
+887 -883

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
PROG = coap_server
SOURCES = $(PROG).c ../../mongoose.c
CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA) -DNS_ENABLE_COAP
CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA) -DMG_ENABLE_COAP
all: $(PROG)
+4 -4
View File
@@ -19,7 +19,7 @@ static void signal_handler(int sig_num) {
static void coap_handler(struct mg_connection *nc, int ev, void *p) {
switch (ev) {
case NS_COAP_CON: {
case MG_EV_COAP_CON: {
uint32_t res;
struct mg_coap_message *cm = (struct mg_coap_message *)p;
printf("CON with msg_id = %d received\n", cm->msg_id);
@@ -32,9 +32,9 @@ static void coap_handler(struct mg_connection *nc, int ev, void *p) {
}
break;
}
case NS_COAP_NOC:
case NS_COAP_ACK:
case NS_COAP_RST: {
case MG_EV_COAP_NOC:
case MG_EV_COAP_ACK:
case MG_EV_COAP_RST: {
struct mg_coap_message *cm = (struct mg_coap_message *)p;
printf("ACK/RST/NOC with msg_id = %d received\n",
cm->msg_id);