osmo-msc[master]: Fix value of stored SMS validity time.
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-HasComments: No
[MERGED] osmo-msc[master]: Fix value of stored SMS validity time.
Harald Welte has submitted this change and it was merged. Change subject: Fix value of stored SMS validity time. .. Fix value of stored SMS validity time. Quote the argument to sqlite's datetime(). Otherwise, the timestamp stored in the database reads back as a negative value for some reason. Before: 1032validity_timestamp = dbi_result_get_datetime(result, "valid_until"); (gdb) p validity_timestamp $2 = -1516814654 After: 1032validity_timestamp = dbi_result_get_datetime(result, "valid_until"); (gdb) p validity_timestamp $2 = 1516814654 Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a --- M src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4bf9b1f..b48d137 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -711,7 +711,7 @@ "user_data, text, " "dest_addr, dest_ton, dest_npi, " "src_addr, src_ton, src_npi) VALUES " - "(datetime('%lld', 'unixepoch'), datetime(%lld, 'unixepoch'), " + "(datetime('%lld', 'unixepoch'), datetime('%lld', 'unixepoch'), " "%u, %u, %u, " "%u, %u, %u, " "%u, " -- To view, visit https://gerrit.osmocom.org/5995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte
[PATCH] osmo-msc[master]: Fix value of stored SMS validity time.
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5995 to look at the new patch set (#2). Fix value of stored SMS validity time. Quote the argument to sqlite's datetime(). Otherwise, the timestamp stored in the database reads back as a negative value for some reason. Before: 1032validity_timestamp = dbi_result_get_datetime(result, "valid_until"); (gdb) p validity_timestamp $2 = -1516814654 After: 1032validity_timestamp = dbi_result_get_datetime(result, "valid_until"); (gdb) p validity_timestamp $2 = 1516814654 Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a --- M src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/95/5995/2 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4bf9b1f..b48d137 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -711,7 +711,7 @@ "user_data, text, " "dest_addr, dest_ton, dest_npi, " "src_addr, src_ton, src_npi) VALUES " - "(datetime('%lld', 'unixepoch'), datetime(%lld, 'unixepoch'), " + "(datetime('%lld', 'unixepoch'), datetime('%lld', 'unixepoch'), " "%u, %u, %u, " "%u, %u, %u, " "%u, " -- To view, visit https://gerrit.osmocom.org/5995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-msc[master]: Fix value of stored SMS validity time.
Review at https://gerrit.osmocom.org/5995 Fix value of stored SMS validity time. Quote the argument to sqlite's datetime(). Otherwise, the timestamp stored in the database reads back as a negative value for some reason. Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a --- M src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/95/5995/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4bf9b1f..b48d137 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -711,7 +711,7 @@ "user_data, text, " "dest_addr, dest_ton, dest_npi, " "src_addr, src_ton, src_npi) VALUES " - "(datetime('%lld', 'unixepoch'), datetime(%lld, 'unixepoch'), " + "(datetime('%lld', 'unixepoch'), datetime('%lld', 'unixepoch'), " "%u, %u, %u, " "%u, %u, %u, " "%u, " -- To view, visit https://gerrit.osmocom.org/5995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf786f9b1efabfe7407fb6414ec0d326d8f7244a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling