while (i) {
if (!strcasecmp(userid, passwdptr[i - 1].userid)) {
if (prev != -1) {
errlog("wrong 1");
uhash->next[prev] = uhash->next[i];
} else {
errlog("wrong 2");
uhash->hash_head[h] = uhash->next[i];
}
if (userid[0] == 0)
uhash->next[0]--;
errlog("wrong 3 i is %d",i);
return i;
}
上面的大if不成立,直接到这里,循环结束后就return -1了
prev = i;
i = uhash->next[i];
}
return -1;
【 在 yuhuan.bbs@ytht.net (板砖王) 的大作中提到: 】
: 接着看deluseridhash为什么出错啊
: 【 在 glutton.bbs@ttsx.cn-bbs.org (拒绝发芽的种子) 的大作中提到: 】
: : shminit以后又可以注册一段时间,但是不知道什么时候就不行了。
: : errlog发现是libytht/user.c这个部分错误,呵呵
: : i = deluseridhash("");
: : if (i <= 0) {
: : errlog("deluseridhash wrong");
: : unlock_passwd(lockfd);
: ...................
--
FROM 61.242.219.134