diff options
author | dequis <dx@dxzone.com.ar> | 2015-11-28 18:09:27 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-11-28 18:09:27 -0300 |
commit | 25f6151ce38d07cd85f68c3e881acdf8652f6dc1 (patch) | |
tree | 610be879386185a1777ff1e7d6f356abc5525fe4 | |
parent | e61f9d1c91c42220da92822113fb953eb8d030bf (diff) |
set_eval_channel_type: skip the channel free/init if nothing is changed
Fixes trac ticket 1108: https://bugs.bitlbee.org/bitlbee/ticket/1108
I would have ignored that ticket (it's about some sort of legacy
migration) but the fix sounds like a sane thing to do
-rw-r--r-- | irc_channel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/irc_channel.c b/irc_channel.c index 50fa14b3..6ba5a4d7 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -212,6 +212,11 @@ static char *set_eval_channel_type(set_t *set, char *value) return SET_INVALID; } + /* Skip the free/init if nothing is being changed */ + if (ic->f == new) { + return value; + } + /* TODO: Return values. */ if (ic->f && ic->f->_free) { ic->f->_free(ic); |