mirror of
https://github.com/Green-Sky/tox_ngc_ext.git
synced 2024-12-23 02:23:24 +01:00
Compare commits
No commits in common. "2b186a30715fb0e03eb9b45117cccc47eb386298" and "c9479153892ff3aee0e65d33cc61aff8df6aa7bc" have entirely different histories.
2b186a3071
...
c947915389
@ -1,13 +1,8 @@
|
|||||||
#include "./ngc_ext.hpp"
|
#include "./ngc_ext.hpp"
|
||||||
|
|
||||||
//#include <cstdint>
|
//#include <cstdint>
|
||||||
#include <cstdio>
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#ifndef EXTRA_LOGGING
|
|
||||||
#define EXTRA_LOGGING 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace NGC_EXT;
|
using namespace NGC_EXT;
|
||||||
|
|
||||||
// global scope
|
// global scope
|
||||||
@ -47,9 +42,7 @@ void NGC_EXT_handle_group_custom_packet(
|
|||||||
PacketType pkg_type = static_cast<PacketType>(*(data + curser));
|
PacketType pkg_type = static_cast<PacketType>(*(data + curser));
|
||||||
curser++;
|
curser++;
|
||||||
|
|
||||||
#if defined(EXTRA_LOGGING) && EXTRA_LOGGING == 1
|
|
||||||
fprintf(stderr, "EX: custom_packet [%s] %lu\n", pkgid2str(pkg_type), length);
|
fprintf(stderr, "EX: custom_packet [%s] %lu\n", pkgid2str(pkg_type), length);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pkg_type == INVALID) {
|
if (pkg_type == INVALID) {
|
||||||
fprintf(stderr, "(invalid)\n");
|
fprintf(stderr, "(invalid)\n");
|
||||||
@ -59,9 +52,7 @@ void NGC_EXT_handle_group_custom_packet(
|
|||||||
auto handle_fn = ngc_ext_ctx->callbacks[pkg_type];
|
auto handle_fn = ngc_ext_ctx->callbacks[pkg_type];
|
||||||
auto handle_ud = ngc_ext_ctx->user_data[pkg_type]; // can be null
|
auto handle_ud = ngc_ext_ctx->user_data[pkg_type]; // can be null
|
||||||
if (handle_fn == nullptr) {
|
if (handle_fn == nullptr) {
|
||||||
#if defined(EXTRA_LOGGING) && EXTRA_LOGGING == 1
|
|
||||||
fprintf(stderr, "EX: !!! no handler for packet\n");
|
fprintf(stderr, "EX: !!! no handler for packet\n");
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user