mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
This commit is contained in:
commit
2663b9d23d
10
INSTALL.md
10
INSTALL.md
|
@ -23,7 +23,7 @@ On Fedora:
|
|||
|
||||
```bash
|
||||
yum groupinstall "Development Tools"
|
||||
yum install libtool autoconf automake libconfig-devel ncurses-devel cmake check
|
||||
yum install libtool autoconf automake libconfig-devel ncurses-devel cmake check check-devel
|
||||
```
|
||||
|
||||
Note that `libconfig-dev` should be >= 1.4.
|
||||
|
@ -61,8 +61,8 @@ mkdir build && cd build
|
|||
cmake ..
|
||||
```
|
||||
Advance cmake options:
|
||||
- `-DSHARED_TOXCORE=ON` (default `OFF`) — Build Core as a shared library.
|
||||
- `-DUSE_NACL=ON` (default `OFF`) — Use NaCl library instead of libsodium.
|
||||
- `-DSHARED_TOXCORE=ON` (default `OFF`) <EFBFBD> Build Core as a shared library.
|
||||
- `-DUSE_NACL=ON` (default `OFF`) <EFBFBD> Use NaCl library instead of libsodium.
|
||||
|
||||
Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only.
|
||||
|
||||
|
@ -150,8 +150,8 @@ mkdir build && cd build
|
|||
cmake -G "MinGW Makefiles" ..
|
||||
```
|
||||
Advance cmake options:
|
||||
- `-DSHARED_TOXCORE=ON` (default OFF) — Build Core as a shared library.
|
||||
- `-DSHARED_LIBSODIUM=ON` (default OFF) — Link libsodium as a shared library.
|
||||
- `-DSHARED_TOXCORE=ON` (default OFF) <EFBFBD> Build Core as a shared library.
|
||||
- `-DSHARED_LIBSODIUM=ON` (default OFF) <EFBFBD> Link libsodium as a shared library.
|
||||
|
||||
Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only.
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ void getaddress(Messenger *m, uint8_t *address)
|
|||
* return FAERR_BADCHECKSUM if bad checksum in address
|
||||
* return FAERR_SETNEWNOSPAM if the friend was already there but the nospam was different
|
||||
* (the nospam for that friend was set to the new one)
|
||||
* return FAERR_NOMEM if increasing the friend list size fails
|
||||
*/
|
||||
int m_addfriend(Messenger *m, uint8_t *address, uint8_t *data, uint16_t length)
|
||||
{
|
||||
|
@ -148,7 +149,8 @@ int m_addfriend(Messenger *m, uint8_t *address, uint8_t *data, uint16_t length)
|
|||
}
|
||||
|
||||
/* resize the friend list if necessary */
|
||||
realloc_friendlist(m, m->numfriends + 1);
|
||||
if (realloc_friendlist(m, m->numfriends + 1) != 0)
|
||||
return FAERR_NOMEM;
|
||||
|
||||
uint32_t i;
|
||||
for (i = 0; i <= m->numfriends; ++i) {
|
||||
|
@ -180,7 +182,8 @@ int m_addfriend_norequest(Messenger *m, uint8_t * client_id)
|
|||
return -1;
|
||||
|
||||
/* resize the friend list if necessary */
|
||||
realloc_friendlist(m, m->numfriends + 1);
|
||||
if (realloc_friendlist(m, m->numfriends + 1) != 0)
|
||||
return FAERR_NOMEM;
|
||||
|
||||
uint32_t i;
|
||||
for (i = 0; i <= m->numfriends; ++i) {
|
||||
|
@ -221,7 +224,9 @@ int m_delfriend(Messenger *m, int friendnumber)
|
|||
break;
|
||||
}
|
||||
m->numfriends = i;
|
||||
realloc_friendlist(m, m->numfriends + 1);
|
||||
|
||||
if (realloc_friendlist(m, m->numfriends + 1) != 0)
|
||||
return FAERR_NOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ extern "C" {
|
|||
#define FAERR_UNKNOWN -5
|
||||
#define FAERR_BADCHECKSUM -6
|
||||
#define FAERR_SETNEWNOSPAM -7
|
||||
#define FAERR_NOMEM -8
|
||||
|
||||
/* don't assume MAX_STATUSMESSAGE_LENGTH will stay at 128, it may be increased
|
||||
to an absurdly large number later */
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
192.184.81.118 33445 5CD7EB176C19A2FD840406CD56177BB8E75587BB366F7BB3004B19E3EDC04143
|
||||
192.210.149.121 33445 F404ABAA1C99A9D37D61AB54898F56793E1DEF8BD46B1038B9D822E8460FAB67
|
||||
81.224.34.47 443 48F0D94C0D54EB1995A2ECEDE7DB6BDD5E05D81704B2F3D1BB9FE43AC97B7269
|
||||
198.46.136.167 33445 728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854
|
||||
198.46.136.167 33445 728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854
|
||||
95.47.140.214 33445 F4BF7C5A9D0EF4CB684090C38DE937FAE1612021F21FEA4DCBFAC6AAFEF58E68
|
||||
|
|
Loading…
Reference in New Issue
Block a user