@@ -1084,7 +1084,7 @@ int add_groupchat(Group_Chats *g_c, uint8_t type)
1084
1084
return groupnumber ;
1085
1085
}
1086
1086
1087
- static int group_leave (const Group_Chats * g_c , uint32_t groupnumber , bool permanent );
1087
+ static bool group_leave (const Group_Chats * g_c , uint32_t groupnumber , bool permanent );
1088
1088
1089
1089
/* Delete a groupchat from the chats array, informing the group first as
1090
1090
* appropriate.
@@ -1654,39 +1654,37 @@ static int group_new_peer_send(const Group_Chats *g_c, uint32_t groupnumber, uin
1654
1654
}
1655
1655
1656
1656
/* send a kill_peer message
1657
- * return 0 on success
1658
- * return -1 on failure
1657
+ * return true on success
1659
1658
*/
1660
- static int group_kill_peer_send (const Group_Chats * g_c , uint32_t groupnumber , uint16_t peer_num )
1659
+ static bool group_kill_peer_send (const Group_Chats * g_c , uint32_t groupnumber , uint16_t peer_num )
1661
1660
{
1662
1661
uint8_t packet [GROUP_MESSAGE_KILL_PEER_LENGTH ];
1663
1662
1664
1663
peer_num = net_htons (peer_num );
1665
1664
memcpy (packet , & peer_num , sizeof (uint16_t ));
1666
1665
1667
1666
if (send_message_group (g_c , groupnumber , GROUP_MESSAGE_KILL_PEER_ID , packet , sizeof (packet )) > 0 ) {
1668
- return 0 ;
1667
+ return true ;
1669
1668
}
1670
1669
1671
- return -1 ;
1670
+ return false ;
1672
1671
}
1673
1672
1674
1673
/* send a freeze_peer message
1675
- * return 0 on success
1676
- * return -1 on failure
1674
+ * return true on success
1677
1675
*/
1678
- static int group_freeze_peer_send (const Group_Chats * g_c , uint32_t groupnumber , uint16_t peer_num )
1676
+ static bool group_freeze_peer_send (const Group_Chats * g_c , uint32_t groupnumber , uint16_t peer_num )
1679
1677
{
1680
1678
uint8_t packet [GROUP_MESSAGE_KILL_PEER_LENGTH ];
1681
1679
1682
1680
peer_num = net_htons (peer_num );
1683
1681
memcpy (packet , & peer_num , sizeof (uint16_t ));
1684
1682
1685
1683
if (send_message_group (g_c , groupnumber , GROUP_MESSAGE_FREEZE_PEER_ID , packet , sizeof (packet )) > 0 ) {
1686
- return 0 ;
1684
+ return true ;
1687
1685
}
1688
1686
1689
- return -1 ;
1687
+ return false ;
1690
1688
}
1691
1689
1692
1690
/* send a name message
@@ -1707,15 +1705,14 @@ static int group_name_send(const Group_Chats *g_c, uint32_t groupnumber, const u
1707
1705
}
1708
1706
1709
1707
/* send message to announce leaving group
1710
- * return 0 on success
1711
- * return -1 on failure
1708
+ * return true on success
1712
1709
*/
1713
- static int group_leave (const Group_Chats * g_c , uint32_t groupnumber , bool permanent )
1710
+ static bool group_leave (const Group_Chats * g_c , uint32_t groupnumber , bool permanent )
1714
1711
{
1715
1712
Group_c * g = get_group_c (g_c , groupnumber );
1716
1713
1717
1714
if (!g ) {
1718
- return -1 ;
1715
+ return false ;
1719
1716
}
1720
1717
1721
1718
if (permanent ) {
0 commit comments