Changeset 709f41f


Ignore:
Timestamp:
2023-02-28T00:13:43Z (21 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
82149f4
Parents:
93d4d8f
git-author:
Edward J. Schwartz <moo.github.domain.edmcman@…> (28-02-23 00:13:43)
git-committer:
GitHub <noreply@…> (28-02-23 00:13:43)
Message:

Allow purple connections to set no_proxy per account. (#144)

  • Allow purple connections to set no_proxy per account.
  • Use g_return_if_fail instead of assert if we fail to allocate a new proxy information object.

Co-authored-by: Edward J. Schwartz <eschwartz@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    r93d4d8f r709f41f  
    285285        s->flags |= ACC_SET_ONLINE_ONLY;
    286286
     287        s = set_add(&acc->set, "no_proxy", "false", set_eval_bool, acc);
     288
    287289        if (pi->options & OPT_PROTO_MAIL_CHECK) {
    288290                s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc);
     
    365367                purple_account_set_string(pa, name, set_getstr(&acc->set, name));
    366368        }
     369
     370        PurpleProxyInfo *proxyinfo = purple_account_get_proxy_info(pa);
     371        if (!proxyinfo) {
     372          proxyinfo = purple_proxy_info_new();
     373        }
     374        g_return_if_fail (proxyinfo);
     375        purple_proxy_info_set_type(proxyinfo, set_getbool(&acc->set, "no_proxy") ? PURPLE_PROXY_NONE : PURPLE_PROXY_USE_GLOBAL);
     376        purple_account_set_proxy_info(pa, proxyinfo);
    367377}
    368378
Note: See TracChangeset for help on using the changeset viewer.