[sr-dev] git:master:dad44317: db_berkeley: covert blob values

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 16 09:23:05 CET 2022


Module: kamailio
Branch: master
Commit: dad443172628c3736b057fa24343c265ed3827b2
URL: https://github.com/kamailio/kamailio/commit/dad443172628c3736b057fa24343c265ed3827b2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-16T09:12:03+01:00

db_berkeley: covert blob values

---

Modified: src/modules/db_berkeley/km_bdb_val.c

---

Diff:  https://github.com/kamailio/kamailio/commit/dad443172628c3736b057fa24343c265ed3827b2.diff
Patch: https://github.com/kamailio/kamailio/commit/dad443172628c3736b057fa24343c265ed3827b2.patch

---

diff --git a/src/modules/db_berkeley/km_bdb_val.c b/src/modules/db_berkeley/km_bdb_val.c
index d895a870c9..e75ad4dc3b 100644
--- a/src/modules/db_berkeley/km_bdb_val.c
+++ b/src/modules/db_berkeley/km_bdb_val.c
@@ -266,10 +266,10 @@ int km_bdb_val2str(db_val_t *_v, char *_s, int *_len)
 				LM_ERR("Destination buffer too short for blob\n");
 				return -7;
 			} else {
-				LM_DBG("Converting BLOB [%s]\n", _s);
-				_s = VAL_BLOB(_v).s;
-				*_len = 0;
-				return -8;
+				LM_DBG("Converted BLOB\n");
+				memcpy(_s, VAL_BLOB(_v).s, l);
+				*_len = l;
+				return 0;
 			}
 			break;
 




More information about the sr-dev mailing list