Skip to content

Commit e66d797

Browse files
committed
Release new version 0.1.3
1 parent 9a0c55e commit e66d797

7 files changed

Lines changed: 20 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Changelog
22
WITSML 2.1 to BSON parser changelogs
33

4-
## [0.1.3] - 2024-10-29
5-
- Update BSON version 1.27.1 -> 1.28.1 ✔️
4+
## [0.1.3] - 2025-12-20
5+
- Update BSON version (MONGO C DRIVER) 1.27.1 -> 2.2.1 ✔️
6+
- BUG FIX: Implement correct memory cleanup (recycled) of previous parsed WITSML 2.1 object in cws_internal_soap_recycle() ✔️
7+
- Update Java bson org.mongodb dependency version to 5.6.2 ✔️
68

79
## [0.1.2] - 2024-05-23
810
- Fixing readTextFree bug ✔️
@@ -20,6 +22,7 @@ WITSML 2.1 to BSON parser changelogs
2022

2123
## [master] - current
2224

25+
[0.1.3]: https://github.com/devfabiosilva/witsml21parser/tree/v0.1.3
2326
[0.1.2]: https://github.com/devfabiosilva/witsml21parser/tree/v0.1.2
2427
[0.1.1]: https://github.com/devfabiosilva/witsml21parser/tree/v0.1.1
2528
[0.1.0]: https://github.com/devfabiosilva/witsml21parser/tree/v0.1.0

Java/library/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>org.mongodb</groupId>
1919
<artifactId>bson</artifactId>
20-
<version>4.9.0</version>
20+
<version>5.6.2</version>
2121
</dependency>
2222
</dependencies>
2323
<properties>

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LIBANAME=cws
1616
LIBDIR=$(CURDIR)/lib
1717

1818
MONGO_C_GIT=https://github.com/mongodb/mongo-c-driver.git
19-
MONGO_C_BRANCH=1.28.1
19+
MONGO_C_BRANCH=2.2.1
2020
MONGO_C_DIR=$(CURDIR)/third-party/mongo-c-driver
2121

2222
FLAG_JNI=-Wno-stringop-truncation -DJNI_RUSAGE_CHILDREN -DCWS_$(ENDIAN)_ENDIAN -D$(STAT)
@@ -42,7 +42,7 @@ all: main
4242

4343
cws_version.o:
4444
@echo "Generating version ..."
45-
@$(CC) -O2 $(CURDIR)/misc/versionBuilder.c $(CURDIR)/src/cws_utils.c $(CURDIR)/src/cws_bson_utils.c -I$(INCLUDEDIR) -o $(CURDIR)/misc/versionBuilder -L$(LIBDIR) -lbson-static-1.0 -Wall $(FLAG) -DVERGEN
45+
@$(CC) -O2 $(CURDIR)/misc/versionBuilder.c $(CURDIR)/src/cws_utils.c $(CURDIR)/src/cws_bson_utils.c -I$(INCLUDEDIR) -o $(CURDIR)/misc/versionBuilder -L$(LIBDIR) -lbson-static-$(MONGO_C_BRANCH) -Wall $(FLAG) -DVERGEN
4646
cd $(CURDIR)/misc/;./versionBuilder
4747
$(LD) -o $(CURDIR)/src/version_bson.o version.bson
4848

@@ -124,12 +124,12 @@ soapC_shared_debug_sanitize.o:
124124

125125
main: soapC.o lib$(LIBANAME).a
126126
@echo "Compiling ..."
127-
@$(CC) -O2 -o $(TARG) main.c stdsoap2.c soapC.o soapServer.c -I$(INCLUDEDIR) -L$(LIBDIR) -lcws -lpthread -lbson-static-1.0 -Wall $(FLAG)
127+
@$(CC) -O2 -o $(TARG) main.c stdsoap2.c soapC.o soapServer.c -I$(INCLUDEDIR) -L$(LIBDIR) -lcws -lpthread -lbson-static-$(MONGO_C_BRANCH) -Wall $(FLAG)
128128
@echo "Finished"
129129

130130
dbg: soapC_debug_sanitize.o lib$(LIBANAME)_debug.a
131131
@echo "Compiling in debug mode ..."
132-
@$(CC) -O2 -o $(TARG_DBG) main.c stdsoap2.c soapC_debug_sanitize.o soapServer.c -I$(INCLUDEDIR) -L$(LIBDIR) -l$(LIBANAME)_debug -lpthread -lbson-static-1.0 -Wall $(DEBUG_FLAG)
132+
@$(CC) -O2 -o $(TARG_DBG) main.c stdsoap2.c soapC_debug_sanitize.o soapServer.c -I$(INCLUDEDIR) -L$(LIBDIR) -l$(LIBANAME)_debug -lpthread -lbson-static-$(MONGO_C_BRANCH) -Wall $(DEBUG_FLAG)
133133
@echo "Finished in debug mode."
134134

135135
##JNI ONLY SOAP INTERNAL
@@ -379,7 +379,7 @@ pre_shared: soapC_shared.o soapC_shared_debug_sanitize.o
379379
.PHONY:
380380
jni: lib$(LIBANAME_JNI).a
381381
@echo "Compiling $(LIBJNI)..."
382-
@$(CC) -O2 -shared -fPIC -o $(LIBJNI) src/jni/parser.c stdsoap2.c soapC_shared.o soapServer.c -I$(INCLUDEDIR) -I$(JAVAINCLUDE) -I$(JAVAINCLUDE_LINUX) -L$(LIBDIR) -lcws_jni -lpthread -lbson-shared-1.0 -Wall $(FLAG_JNI)
382+
@$(CC) -O2 -shared -fPIC -o $(LIBJNI) src/jni/parser.c stdsoap2.c soapC_shared.o soapServer.c -I$(INCLUDEDIR) -I$(JAVAINCLUDE) -I$(JAVAINCLUDE_LINUX) -L$(LIBDIR) -lcws_jni -lpthread -lbson-shared-$(MONGO_C_BRANCH) -Wall $(FLAG_JNI)
383383
@echo "Striping $(LIBJNI) ..."
384384
@$(STRIP) $(LIBJNI)
385385
@echo "Disabling execstack ..."
@@ -410,7 +410,7 @@ ifneq ("$(wildcard $(MONGO_C_DIR))","")
410410
@echo "Already cloned. Skip"
411411
else
412412
@echo "Cloning branch $(MONGO_C_BRANCH) from $(MONGO_C_GIT)"
413-
pwd; cd $(CURDIR)/third-party; pwd; git clone -b $(MONGO_C_BRANCH) $(MONGO_C_GIT); cd mongo-c-driver;mkdir compiled && cd compiled; cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_MONGOC=OFF -DCMAKE_INSTALL_PREFIX=$(MONGO_C_DIR)/compiled/out; make -j12;make install; pwd; cp out/lib/libbson-static-1.0.a $(LIBDIR) -v;cp -frv out/include/libbson-1.0/bson $(INCLUDEDIR);cd src/libbson/CMakeFiles/bson_shared.dir; pwd; ar rcs $(LIBDIR)/libbson-shared-1.0.a src/bson/*.o src/jsonsl/*.o __/common/*.o
413+
pwd; cd $(CURDIR)/third-party; pwd; git clone -b $(MONGO_C_BRANCH) $(MONGO_C_GIT); cd mongo-c-driver;mkdir compiled && cd compiled; cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_MONGOC=OFF -DCMAKE_INSTALL_PREFIX=$(MONGO_C_DIR)/compiled/out; make -j12;make install; pwd; cp out/lib/libbson2.a $(LIBDIR)/libbson-static-$(MONGO_C_BRANCH).a -v;cp -frv out/include/bson-$(MONGO_C_BRANCH)/bson $(INCLUDEDIR);cd src/libbson/CMakeFiles/bson_shared.dir; pwd; ar rcs $(LIBDIR)/libbson-shared-$(MONGO_C_BRANCH).a src/bson/*.o src/jsonsl/*.o __/common/src/*.o
414414
endif
415415

416416
remove_bson:
@@ -441,10 +441,10 @@ endif
441441
#TESTS
442442
pointers_assert:
443443
@echo "Building C pointer assert (TEST)"
444-
@$(CC) -c -O2 $(TEST_C_DIR)/pointers_assert.c -I$(INCLUDEDIR) -I$(TEST_INCLUDE_DIR) -I$(CURDIR) -L$(LIBDIR) -lpthread -lbson-static-1.0 -o $(TEST_C_DIR)/pointers_assert.o -Wall $(DEBUG_FLAG)
444+
@$(CC) -c -O2 $(TEST_C_DIR)/pointers_assert.c -I$(INCLUDEDIR) -I$(TEST_INCLUDE_DIR) -I$(CURDIR) -L$(LIBDIR) -lpthread -lbson-static-$(MONGO_C_BRANCH) -o $(TEST_C_DIR)/pointers_assert.o -Wall $(DEBUG_FLAG)
445445

446446
test: lib$(LIBANAME)_debug.a pointers_assert
447447
@echo "Build C test (TEST) ..."
448-
@$(CC) -O2 $(TEST_C_DIR)/main.c $(CURDIR)/src/ctest/asserts.c $(TEST_C_DIR)/pointers_assert.o stdsoap2.c soapC_debug_sanitize.o soapServer.c -I$(TEST_INCLUDE_DIR) -I$(INCLUDEDIR) -I$(CURDIR) -L$(LIBDIR) -l$(LIBANAME)_debug -lpthread -lbson-static-1.0 -o $(TEST_C_DIR)/$(TEST_C_EXEC_NAME) -Wall $(DEBUG_FLAG)
448+
@$(CC) -O2 $(TEST_C_DIR)/main.c $(CURDIR)/src/ctest/asserts.c $(TEST_C_DIR)/pointers_assert.o stdsoap2.c soapC_debug_sanitize.o soapServer.c -I$(TEST_INCLUDE_DIR) -I$(INCLUDEDIR) -I$(CURDIR) -L$(LIBDIR) -l$(LIBANAME)_debug -lpthread -lbson-static-$(MONGO_C_BRANCH) -o $(TEST_C_DIR)/$(TEST_C_EXEC_NAME) -Wall $(DEBUG_FLAG)
449449
@$(TEST_C_DIR)/./$(TEST_C_EXEC_NAME)
450450

binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"include_dirs":[ "./include", "./" ],
77
"library_dirs": ["./lib"],
88
"libraries": [
9-
"-Wl,--start-group ../lib/libcws_js.a ../lib/libbson-shared-1.0.a ../soapC_shared.o -Wl,--end-group"
9+
"-Wl,--start-group ../lib/libcws_js.a ../lib/libbson-shared-2.2.1.a ../soapC_shared.o -Wl,--end-group"
1010
],
1111
"defines": ["CWS_LITTLE_ENDIAN", "WITH_STATISTICS"],
1212
"cflags": ["-Wno-stringop-truncation", "-Wno-format-truncation"],

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def main():
1111
maintainer_email="fabioegel@gmail.com",
1212
ext_modules=[Extension("witsml21bson", ["src/python/module.c", "stdsoap2.c" ,"soapServer.c"],
1313
library_dirs=['lib'],
14-
libraries=['cws_py', 'bson-shared-1.0'],
14+
libraries=['cws_py', 'bson-shared-2.2.1'],
1515
extra_objects=["soapC_shared.o"],
1616
include_dirs=['include'],
1717
define_macros=[('CWS_LITTLE_ENDIAN', None), ('WITH_STATISTICS', None)]

src/cws_soap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ void cws_internal_soap_recycle(struct soap *soap_internal)
7979
config->cws_soap_fault.XMLfaultdetail=NULL;
8080
config->cws_soap_fault.XMLfaultdetail_len=0;
8181
}
82+
83+
soap_destroy(soap_internal); /* delete deserialized objects */
84+
soap_end(soap_internal); /* delete heap and temp data */
8285
}
8386

8487
void cws_internal_soap_free(struct soap **soap)

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"license": "See https://www.genivia.com/products.html"
3434
},
3535
"libbson": {
36-
"version": "1.28.1",
36+
"version": "2.2.1",
3737
"website": "https://github.com/mongodb/mongo-c-driver",
3838
"license": "Apache License 2.0"
3939
}

0 commit comments

Comments
 (0)