about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-02-15 17:13:03 +0100
committerGitHub <noreply@github.com>2021-02-15 17:13:03 +0100
commitb170fcb55f9890717e8142e6029756672e8645f8 (patch)
tree5e821c2130a9a0dbf7aeeffe48223c0a24d721a9
parent69e923df3b3ede66005e057d6ef464222937e07f (diff)
parent49dc9c5755bda6e395c85faada3989f024fda202 (diff)
downloadprofani-tty-b170fcb55f9890717e8142e6029756672e8645f8.tar.gz
Merge pull request #1484 from kaffeekanne/calm-openbsd-syslog
Calm OpenBSD syslog
-rw-r--r--src/database.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/database.c b/src/database.c
index 5ea981f8..4919dc3d 100644
--- a/src/database.c
+++ b/src/database.c
@@ -334,14 +334,14 @@ _add_to_db(ProfMessage* message, char* type, const Jid* const from_jid, const Ji
                  from_jid->resourcepart ? from_jid->resourcepart : "",
                  to_jid->barejid,
                  to_jid->resourcepart ? to_jid->resourcepart : "",
-                 escaped_message,
-                 date_fmt,
+                 escaped_message ? escaped_message : "",
+                 date_fmt ? date_fmt : "",
                  message->id ? message->id : "",
                  message->stanzaid ? message->stanzaid : "",
                  message->replace_id ? message->replace_id : "",
-                 type,
-                 enc,
-                 message->stanzaid)
+                 type ? type : "",
+                 enc ? enc : "",
+                 message->stanzaid ? message->stanzaid : "")
         == -1) {
         log_error("log_database_add(): SQL query. could not allocate memory");
         return;