Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the mechanism for calling methods like msgAuthenticate or msgPing? #6737

Closed
archie2010 opened this issue Feb 26, 2025 · 2 comments
Closed
Labels

Comments

@archie2010
Copy link

The issue

Newbie seeking help.
I am studying the Mumble code and have a question. How are methods like msgAuthenticate or msgPing called in murmur module, and what is the triggering mechanism or entry point?

Mumble version

master

Mumble component

Server

OS

Windows

Additional information

No response

@archie2010 archie2010 changed the title What is the mechanism for calling methods like msgAuthenticate and msgPing? What is the mechanism for calling methods like msgAuthenticate or msgPing? Feb 26, 2025
@Krzmbrzl
Copy link
Member

Server:

mumble/src/murmur/Server.cpp

Lines 1719 to 1745 in 3e56558

#ifdef QT_NO_DEBUG
# define PROCESS_MUMBLE_TCP_MESSAGE(name, value) \
case Mumble::Protocol::TCPMessageType::name: { \
MumbleProto::name msg; \
if (msg.ParseFromArray(qbaMsg.constData(), static_cast< int >(qbaMsg.size()))) { \
msg.DiscardUnknownFields(); \
msg##name(u, msg); \
} \
break; \
}
#else
# define PROCESS_MUMBLE_TCP_MESSAGE(name, value) \
case Mumble::Protocol::TCPMessageType::name: { \
MumbleProto::name msg; \
if (msg.ParseFromArray(qbaMsg.constData(), static_cast< int >(qbaMsg.size()))) { \
if (type != Mumble::Protocol::TCPMessageType::Ping) { \
printf("== %s:\n", #name); \
msg.PrintDebugString(); \
} \
msg.DiscardUnknownFields(); \
msg##name(u, msg); \
} \
break; \
}
#endif
switch (type) { MUMBLE_ALL_TCP_MESSAGES }

Client:

#ifdef QT_NO_DEBUG
# define PROCESS_MUMBLE_TCP_MESSAGE(name, value) \
case Mumble::Protocol::TCPMessageType::name: { \
MumbleProto::name msg; \
if (msg.ParseFromArray(shme->qbaMsg.constData(), static_cast< int >(shme->qbaMsg.size()))) \
msg##name(msg); \
break; \
}
#else
# define PROCESS_MUMBLE_TCP_MESSAGE(name, value) \
case Mumble::Protocol::TCPMessageType::name: { \
MumbleProto::name msg; \
if (msg.ParseFromArray(shme->qbaMsg.constData(), static_cast< int >(shme->qbaMsg.size()))) { \
printf("%s:\n", #name); \
msg.PrintDebugString(); \
msg##name(msg); \
} \
break; \
}
#endif
switch (shme->type) { MUMBLE_ALL_TCP_MESSAGES }

@archie2010
Copy link
Author

archie2010 commented Feb 26, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants