Exemple #1
0
static void prv_remove(char * buffer,
                       void * user_data)
{
    lwm2m_context_t * lwm2mH = (lwm2m_context_t *)user_data;
    int res;

    res = lwm2m_remove_object(lwm2mH, 1024);
    if (res != 0)
    {
        fprintf(stdout, "Removing object 1024 failed: ");
        print_status(stdout, res);
        fprintf(stdout, "\r\n");
    }
    else
    {
        fprintf(stdout, "Object 1024 removed.\r\n");
    }
    return;
}
static void prv_remove(char *buffer, void *user_data)
{
	lwm2mH = (lwm2m_context_t *)user_data;
	int res;

	lwm2m_object_t * objectP;
	objectP = (lwm2m_object_t *)LWM2M_LIST_FIND(lwm2mH->objectList, 1024);
	res = lwm2m_remove_object(lwm2mH, 1024);
	if (res != 0) {
		fprintf(stdout, "Removing object 1024 failed: ");
		print_status(stdout, res);
		fprintf(stdout, "\r\n");
	} else {
		fprintf(stdout, "Object 1024 removed.\r\n");
		free_test_object(objectP);
		objArray[5] = NULL;
	}
	return;
}