Merge pull request #435 from nurupo/master

Fixes of my previous pull request
This commit is contained in:
irungentoo 2013-08-11 13:59:56 -07:00
commit b5d6c22b7b
2 changed files with 3 additions and 3 deletions

View File

@ -496,8 +496,8 @@ static void check_friend_connectionstatus(int friendnumber, uint8_t status)
return;
if (status == NOFRIEND)
return;
const uint8_t is_connected = friendlist[friendnumber].status == FRIEND_ONLINE;
const uint8_t was_connected = status == FRIEND_ONLINE;
const uint8_t was_connected = friendlist[friendnumber].status == FRIEND_ONLINE;
const uint8_t is_connected = status == FRIEND_ONLINE;
if (is_connected != was_connected)
friend_connectionstatuschange(friendnumber, is_connected);
}

View File

@ -211,7 +211,7 @@ void m_callback_userstatus(void (*function)(int, USERSTATUS));
in that case, you should discard it. */
void m_callback_read_receipt(void (*function)(int, uint32_t));
/* set the callback for conenction status changes
/* set the callback for connection status changes
function(int friendnumber, uint8_t status)
status:
0 -- friend went offline after being previously online