Dear Sir:
Recently, I have been reading jabberd2 source. Now , there are two puzzles
for me.
1 About sx_raw_write(sx_t s, char* buf, int len) function.
This function is invoked by xxx_time_checks() function, for example
_router_time_checks in the file main.c(router).
I see that the sentence "sx_raw_write(target->s, " ", 1)" want to
check the connection with other components.
As usual, when other component(eg c2s) receviev the "conncetion test
message", it should response some message for it.
But I can't find where c2s process the "connection test message"
2 About the value of comp->s->auth_id.
In the implementation of fuction _router_process_bind
user = strdup(comp->s->auth_id);
c = strchr(user, '@' <'@');>); <'@'>
if(c != NULL) *c = '\0'; if(strcmp(user, name->domain) != 0 &&
!aci_check(comp->r->aci, "bind", user)) {
We can presume that the value of comp->s->auth_id equals name->domain's
value. For example, name->domain is "c2s",then comp->s->auth_id is also "c2s
.
But another code in _router_sx_callback, the vaule of comp->s->auth_id
is different.
log_write(comp->r->log, LOG_NOTICE, "[%s, port=%d] authenticated as
%s", comp->ip, comp->port, comp->s->auth_id);//at line 639 in file router.c
(router).
The log file tell the value of comp->s->auth_id is "
[EMAIL PROTECTED]"
I don't think the value of comp->s->auth_id be changed?
Do you think I am right?
If I were wrong , please tell me where the value has been changed.
Thanks advanced! :-P
_______________________________________________
Jabberd2 mailing list
[email protected]
http://lists.xiaoka.com/listinfo.cgi/jabberd2-xiaoka.com