diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-09 14:16:53 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-09 14:16:53 -0400 |
commit | c137ec9d4d37dedf4d2a40d8c573eed4239a8ec1 (patch) | |
tree | a0f4924cac57968c3f06d85fba575311e278e1ed | |
parent | 00c9c8ab57a21253406d2b73e5ca9404f44f3583 (diff) |
move group chats to /toxcore
-rw-r--r-- | testing/experiment/group_chats_test.c | 2 | ||||
-rw-r--r-- | testing/experiment/group_chats_test1.c | 2 | ||||
-rw-r--r-- | toxcore/group_chats.c (renamed from testing/experiment/group_chats.c) | 4 | ||||
-rw-r--r-- | toxcore/group_chats.h (renamed from testing/experiment/group_chats.h) | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/testing/experiment/group_chats_test.c b/testing/experiment/group_chats_test.c index 9ddf5e85..900da79c 100644 --- a/testing/experiment/group_chats_test.c +++ b/testing/experiment/group_chats_test.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "group_chats.h" | 1 | #include "../../toxcore/group_chats.h" |
2 | #define NUM_CHATS 8 | 2 | #define NUM_CHATS 8 |
3 | 3 | ||
4 | #ifdef WIN32 | 4 | #ifdef WIN32 |
diff --git a/testing/experiment/group_chats_test1.c b/testing/experiment/group_chats_test1.c index f66c2d24..efd9ae84 100644 --- a/testing/experiment/group_chats_test1.c +++ b/testing/experiment/group_chats_test1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "group_chats.h" | 1 | #include "../../toxcore/group_chats.h" |
2 | #define NUM_CHATS 8 | 2 | #define NUM_CHATS 8 |
3 | 3 | ||
4 | #ifdef WIN32 | 4 | #ifdef WIN32 |
diff --git a/testing/experiment/group_chats.c b/toxcore/group_chats.c index 0698ebf8..3c134348 100644 --- a/testing/experiment/group_chats.c +++ b/toxcore/group_chats.c | |||
@@ -384,6 +384,10 @@ static int handle_data(Group_Chat *chat, uint8_t *data, uint32_t len) | |||
384 | //TODO: | 384 | //TODO: |
385 | int peernum = peer_in_chat(chat, data); | 385 | int peernum = peer_in_chat(chat, data); |
386 | 386 | ||
387 | if (peernum == -1) { /*NOTE: This is just for testing and will be removed later.*/ | ||
388 | peernum = addpeer(chat, data); | ||
389 | } | ||
390 | |||
387 | if (peernum == -1) | 391 | if (peernum == -1) |
388 | return 1; | 392 | return 1; |
389 | 393 | ||
diff --git a/testing/experiment/group_chats.h b/toxcore/group_chats.h index 3330ce10..7af13d8d 100644 --- a/testing/experiment/group_chats.h +++ b/toxcore/group_chats.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #ifndef GROUP_CHATS_H | 25 | #ifndef GROUP_CHATS_H |
26 | #define GROUP_CHATS_H | 26 | #define GROUP_CHATS_H |
27 | 27 | ||
28 | #include "../../toxcore/net_crypto.h" | 28 | #include "net_crypto.h" |
29 | 29 | ||
30 | #ifdef __cplusplus | 30 | #ifdef __cplusplus |
31 | extern "C" { | 31 | extern "C" { |