【 在 stiger (Software like sex,better when it's free) 的大作中提到: 】
: 标 题: Re: 封禁匿名版面内匿名用户掉线的gdb调试信息
: 发信站: 水木社区 (Tue May 16 11:47:45 2006), 转信
:
:
: 【 在 roctall (蛇王阿奔) 的大作中提到: 】
: : 标 题: Re: 封禁匿名版面内匿名用户掉线的gdb调试信息
: : 发信站: 水木社区 (Tue May 16 11:46:12 2006), 转信
: :
: : bt出来的信息看得不是太明白,我看大致意思是
: : 执行到deny_anony函数里的giveup_addpost函数中的getuser函数出错,相关部分代码
: : /* stiger,增加封禁某人的发文权限1天 */
: : int giveup_addpost(char *userid){
: : struct userec *user;
: : int i,s[GIVEUPINFO_PERM_COUNT];
: : if(!(getuser(userid,user)))
: int getuser(const char *userid, struct userec **user)
: 参数不对啊
这才是我写的代码,哼,
肯定是etn搞错了,cvs里的代码不对
#ifdef DENYANONY
/* stiger,???ó·a???3è?μ?·¢??è¨?T1ìì */
int giveup_addpost(char *userid, int day){
struct userec *user;
int i,s[GIVEUPINFO_PERM_COUNT];
if(!(getuser(userid,&user)))
: : return 0;
: : get_giveupinfo(user,s);
: : s[1]=-(1+(!s[1]?(time(NULL)/86400):((s[1]<0)?(-s[1]):s[1])));
: : user->userlevel&=~PERM_POST;
: : return (save_giveupinfo(user,s)+1);
: : }
: : 以及
: : int getuser(const char *userid, struct userec **user)
: : { /* 取用户信息 */
: : int uid = searchuser(userid);
: :
: : if (uid == 0) {
: : if (user)
: : *user = NULL;
: : return 0;
: : }
: : if (user)
: : *user = &uidshm->passwd[uid - 1];
: : return uid;
: : }
: : 没看出来问题所在....请各位指点~
: : 【 在 roctall (蛇王阿奔) 的大作中提到: 】
: : : 第一次成功的执行了gdb...各位帮忙看看错误该如何修改吧
: : : BBS正常登陆,进入匿名版面内,将光标定位到匿名发文的文章前
: : : 切换到linux(debian)终端界面,用ps aux|grep bbsd找到当前登录进程的pid
: : : ...................
: :
: : --
: : ╔ ○═══════○ ╗
: : ┈┈┈┈─┄┈─┄║生 命 不 息║┄─┈┈┈─┄┈┄┈
: : ┈┄┄┈-roctall┄┈║≈≈≈≈≈≈≈║┈┄蛇王阿奔┄┄┄┄┄
: : ┈┈┈┄┄┄┄┈┈║灌 水 不 止║┄┄┈┈┄┄┄┄┄┈
: : ╚ ○═══════○ ╝
: :
: :
: : ※ 来源:·水木社区 newsmth.net·[FROM: 60.4.28.*]
:
:
: --
: “小猪”,女,2004年5月1日出生,体重4公斤左右
: “努努”,男,2005年3月23日出生,体重5公斤左右
:
:
: ※ 来源:·水木社区 newsmth.net·[FROM: 211.144.200.*]
--
FROM 211.144.200.*