Supply sid with user information in adcclient test code.
This commit is contained in:
parent
99e644597d
commit
9981acca08
|
@ -258,6 +258,7 @@ static void ADC_client_on_recv_line(struct ADC_client* client, const char* line,
|
||||||
if (adc_msg_has_named_argument(msg, "ID"))
|
if (adc_msg_has_named_argument(msg, "ID"))
|
||||||
{
|
{
|
||||||
struct ADC_user user;
|
struct ADC_user user;
|
||||||
|
user.sid = msg->source;
|
||||||
EXTRACT_NAMED_ARG(msg, "NI", user.name);
|
EXTRACT_NAMED_ARG(msg, "NI", user.name);
|
||||||
EXTRACT_NAMED_ARG(msg, "DE", user.description);
|
EXTRACT_NAMED_ARG(msg, "DE", user.description);
|
||||||
EXTRACT_NAMED_ARG(msg, "VE", user.version);
|
EXTRACT_NAMED_ARG(msg, "VE", user.version);
|
||||||
|
|
|
@ -44,7 +44,7 @@ static int handle(struct ADC_client* client, enum ADC_client_callback_type type,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ADC_CLIENT_USER_JOIN:
|
case ADC_CLIENT_USER_JOIN:
|
||||||
printf(" JOIN: %s\n", data->user->name);
|
printf(" JOIN: %s %s\n", sid_to_string(data->user->sid), data->user->name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ADC_CLIENT_USER_QUIT:
|
case ADC_CLIENT_USER_QUIT:
|
||||||
|
|
Loading…
Reference in New Issue