Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowering xmpp presence priority on away. #38

Closed
wants to merge 1 commit into from

Conversation

sm00th
Copy link
Contributor

@sm00th sm00th commented May 26, 2015

When user set's away lower xmpp presence priority by 5 as most clients do, new
priority won't go below zero though.

Basically the same patch as at https://bugs.bitlbee.org/bitlbee/ticket/1164 but with updated codestyle.
Not sure if this needs a separate setting to choose the away priority.


if (jd->away_state->code != NULL) {
int new_prio = (atoi(prio) - 5);
if (new_prio < 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nitpick: {...} are required now even for one line blocks

When user set's away lower xmpp presence priority by 5 as most clients do, new
priority won't go below zero though.
@dequis
Copy link
Member

dequis commented May 28, 2015

Merged to develop as 24f113b. Thanks!

@dequis dequis closed this May 28, 2015
seveas pushed a commit to seveas/bitlbee that referenced this pull request Feb 28, 2016
Many thanks to kinnison for reporting this bug.
This bug should not have a practical impact as a properly sized buffer will not overflow. It is nonetheless important to be accurate in these types of checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants