Skip to content
Success

Changes

Summary

  1. sqlite optimisation: Avoid unneeded database operation (details)
Commit 3cf64bd623b7277e0e24a00c7c4410f3aca7716a by keith
sqlite optimisation: Avoid unneeded database operation

It is pointless to mark an SMS as sent immediatly
before deleting it. Let's avoid the extra database
overhead involved in doing this operation.

We change the db function which is used to delete
SMS, changing the where clause, so let's also
remove the word "sent" in the function name,
now: db_sms_delete_message_by_id()

This function is only called from one place; when
deleting sent messages, but better the name
reflects what it actually does.

The unit test is changed now that we cannot
delete based on sent status anymore.

Change-Id: I777155c0f818b979c636bb59953719e472771603
The file was modifiedinclude/osmocom/msc/db.h
The file was modifiedsrc/libmsc/sms_queue.c
The file was modifiedtests/db_sms/db_sms_test.c
The file was modifiedsrc/libmsc/db.c
The file was modifiedsrc/libmsc/gsm_04_11.c
The file was modifiedtests/db_sms/db_sms_test.ok