#927036 set disable_random_resource = 0 has wrong effect

Package:
mcabber
Source:
mcabber
Description:
small Jabber (XMPP) console client
Submitter:
"Marriott NZ"
Date:
2022-03-31 06:00:03 UTC
Severity:
normal
#927036#5
Date:
2019-04-14 01:00:29 UTC
From:
To:
mcabber queries "disable_random_resource" as a string option rather than a numeric (on/off) option. As a result, both "0" and "1" activate the option, and only the empty string can deactivate it.

In xmpp.c:1858:
  if (!settings_opt_get("disable_random_resource")) {
should be changed to:
  if (!settings_opt_get_int("disable_random_resource")) {

I reported it upstream more than a year ago, but the issue tracker is dead since 2017, maybe a debian patch could be added.
https://bitbucket.org/McKael/mcabber-crew/issues/163

#927036#10
Date:
2019-05-16 21:16:46 UTC
From:
To:
Seems fixed upstream:
https://bitbucket.org/McKael/mcabber-crew/commits/3385a4bb62efa71bb522ebd6e5f57c49e22a72e4

It doesn't really matter now, but I said that the empty string can deactivate the option and that is not true. It must be *unset* (never set or explicitly unset).

set disable_random_resource = "" # set to the empty string; "settings_opt_get" returns non-null pointer
set disable_random_resource =    # unset; "settings_opt_get" returns null

#927036#15
Date:
2022-03-31 05:57:29 UTC
From:
To:
Hello,

it looks this bug has been fixed in version "1.1.1".
There was a commit: Fri May 10 00:17:20 2019 +0200

    Check setting disable_random_resource correctly

I have tested this bug with 1.1.2-1:

set disable_random_resource = 1 - the resource is set to mcabber
set disable_random_resource = 0 - the resource is set to random