--- 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 <mikael@lilotux.net>
+ * Copyright (C) 2005-2015 Mikael Berthe <mikael@lilotux.net>
*
* 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);