Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: wakaama/liblwm2m.c
- Revision:
- 11:1fadb70654a6
- Parent:
- 10:df97539c6ddd
- Child:
- 12:cc4b0014fc3a
--- a/wakaama/liblwm2m.c Wed May 03 18:24:09 2017 +0800
+++ b/wakaama/liblwm2m.c Wed May 03 19:00:24 2017 +0800
@@ -63,6 +63,16 @@
t->tv_usec = 0;
return 0; /* 1sec precision only */
}
+
+char * strdup(const char *s)
+{
+ size_t len = strlen(s) +1;
+ void *new = malloc(len);
+ if (new == NULL)
+ return NULL;
+ return (char *)memecpy(new,s,len);
+}
+
#endif
lwm2m_context_t * lwm2m_init(void * userData)
@@ -369,7 +379,7 @@
LOG_ARG("timeoutP: %" PRId64, *timeoutP);
tv_sec = lwm2m_gettime();
- if (tv_sec < 0) return COAP_500_INTERNAL_SERVER_ERROR;
+ //if (tv_sec < 0) return COAP_500_INTERNAL_SERVER_ERROR;
#ifdef LWM2M_CLIENT_MODE
LOG_ARG("State: %s", STR_STATE(contextP->state));