Change in osmo-msc[master]: sms db: when storing an SMS, retrieve the ID

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Mon Nov 25 22:05:39 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16218 )


Change subject: sms db: when storing an SMS, retrieve the ID
......................................................................

sms db: when storing an SMS, retrieve the ID

seemed like a good idea, but not sure if we need it at all.

Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf
---
M src/libmsc/db.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/18/16218/1

diff --git a/src/libmsc/db.c b/src/libmsc/db.c
index 241bc86..a1683be 100644
--- a/src/libmsc/db.c
+++ b/src/libmsc/db.c
@@ -769,6 +769,9 @@
 		return -EIO;
 
 	dbi_result_free(result);
+
+	sms->id = dbi_conn_sequence_last(conn, "id");
+	LOGP(DLSMS, LOGL_INFO, "Stored SMS id=%llu in DB\n", sms->id);
 	return 0;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16218
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf
Gerrit-Change-Number: 16218
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191125/233591c4/attachment.htm>


More information about the gerrit-log mailing list