# HG changeset patch # User Mikael Berthe # Date 1446894975 -3600 # Node ID 736f9323d701c7b8935218d47af468f7d0634138 # Parent 965e0282c128959f64c245aaf829dc0d29410ee1 Update comments to hlog_get_log_jid() diff -r 965e0282c128 -r 736f9323d701 mcabber/mcabber/histolog.c --- a/mcabber/mcabber/histolog.c Fri Nov 06 22:31:40 2015 +0100 +++ b/mcabber/mcabber/histolog.c Sat Nov 07 12:16:15 2015 +0100 @@ -1,7 +1,7 @@ /* * histolog.c -- File history handling * - * Copyright (C) 2005-2010 Mikael Berthe + * Copyright (C) 2005-2015 Mikael Berthe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,6 +68,9 @@ return filename; } +// hlog_get_log_jid(bare_jid) +// Returns the real JID used for a symlinked history log file, +// or NULL if there's no symbolic link. char *hlog_get_log_jid(const char *bjid) { struct stat bufstat; @@ -84,8 +87,9 @@ if (readlink(path, log_jid, bufstat.st_size) < 0) return NULL; g_free(path); path = user_histo_file(log_jid); - } else + } else { break; + } } g_free(path);