aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/database.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-04-12 14:19:15 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-04-12 14:19:15 -0700
commite9bb90ba2c18ac6c36168ccb20099ef395d7dfb6 (patch)
tree3491d14f501086daabc9758447c35ec842db33a8 /lib/database.cc
parent40ea73cf052ad3f055174583d336a13682b074bd (diff)
lib: Fix internal documentation of _resolve_message_id_to_thread_id
We no longer return NULL, but instead generate a new thread ID for messages that we haven't seen yet.
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/database.cc b/lib/database.cc
index 92234ff4..9cd46d4f 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1138,10 +1138,13 @@ _get_metadata_thread_id_key (void *ctx, const char *message_id)
/* Find the thread ID to which the message with 'message_id' belongs.
*
- * Returns NULL if no message with message ID 'message_id' is in the
- * database.
+ * Always returns a newly talloced string belonging to 'ctx'.
*
- * Otherwise, returns a newly talloced string belonging to 'ctx'.
+ * Note: If there is no message in the database with the given
+ * 'message_id' then a new thread_id will be allocated for this
+ * message and stored in the database metadata, (where this same
+ * thread ID can be looked up if the message is added to the database
+ * later).
*/
static const char *
_resolve_message_id_to_thread_id (notmuch_database_t *notmuch,