[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [pbmserv-dev] New guy
> You did the sendmail tweak right, but there is also an "advertisement"
> bit. Either erase that from the code or just add a PBMHOME/advertisement
> file. A simple text file will work.
I commented out the whole section - and we got a bit further... now we get
the seg fault after board 2 instead of board 1. Here's the modified code
section, followed by the output. My change was the comment that starts
before the if and ends before the closing }
------------------------------------------------
void MIME_Footer(FILE *fp,int append_ad)
{
char *type = getenv("CONTENTTYPE");
char *boundary = getenv("MIME_BOUNDARY");
char advfile[256];
char line[256];
FILE *advfp;
/*if (!type ||
!strcasecmp(type,"text/plain") ||
!strncasecmp(type,"text/plain;",11) ||
!boundary) {
sprintf(advfile,"%s/advertisement",getenv("PBMHOME"));
advfp = f_open(advfile,"r");
while (append_ad && advfp && fgets(line,sizeof(line),advfp))
fputs(line,fp);
f_close(advfp);
return;
}
sprintf(advfile,"%s/advertisement",getenv("PBMHOME"));
advfp = f_open(advfile,"r");
if (append_ad && advfp) {
fprintf(fp,"--%s\n",boundary);
fprintf(fp,"Content-Type: text/plain\n");
fprintf(fp,"Content-Disposition: inline\n\n");
}
while (append_ad && advfp && fgets(line,sizeof(line),advfp))
fputs(line,fp);
f_close(advfp);
fprintf(fp,"--%s--\n",boundary);*/
}
-------------------------------------
$ ./gomoku challenge test1 test2
From: Richard's PBeM Server <pbmserv@gamerz.net>
Message-Id: <pbmserv.1120057727.3796.6@play.gamerz.net>
To: test1@abacustech.info
Subject: New Gomoku Board 6 test1
A new Gomoku board (6) has been started
Please start the game test1.
Ohs (o) Eks (x)
test1 test2
A B C D E F G H J K L M N O P
15 - - - - - - - - - - - - - - - 15
14 - - - - - - - - - - - - - - - 14
13 - - - - - - - - - - - - - - - 13
12 - - - - - - - - - - - - - - - 12
11 - - - - - - - - - - - - - - - 11
10 - - - - - - - - - - - - - - - 10
9 - - - - - - - - - - - - - - - 9
8 - - - - - - - - - - - - - - - 8
7 - - - - - - - - - - - - - - - 7
6 - - - - - - - - - - - - - - - 6
5 - - - - - - - - - - - - - - - 5
4 - - - - - - - - - - - - - - - 4
3 - - - - - - - - - - - - - - - 3
2 - - - - - - - - - - - - - - - 2
1 - - - - - - - - - - - - - - - 1
A B C D E F G H J K L M N O P
Rules at: http://www.gamerz.net/pbmserv/Gomoku.html
Graphics: http://www.math.lsu.edu/~wamelen/gamerz/Gomoku/Gomoku.php?6&html
From: Richard's PBeM Server <pbmserv@gamerz.net>
Message-Id: <pbmserv.1120057727.3796.6@play.gamerz.net>
To: test2@abacustech.info
Subject: New Gomoku Board 6 test1
A new Gomoku board (6) has been started
Please start the game test1.
Ohs (o) Eks (x)
test1 test2
A B C D E F G H J K L M N O P
15 - - - - - - - - - - - - - - - 15
14 - - - - - - - - - - - - - - - 14
13 - - - - - - - - - - - - - - - 13
12 - - - - - - - - - - - - - - - 12
11 - - - - - - - - - - - - - - - 11
10 - - - - - - - - - - - - - - - 10
9 - - - - - - - - - - - - - - - 9
8 - - - - - - - - - - - - - - - 8
7 - - - - - - - - - - - - - - - 7
6 - - - - - - - - - - - - - - - 6
5 - - - - - - - - - - - - - - - 5
4 - - - - - - - - - - - - - - - 4
3 - - - - - - - - - - - - - - - 3
2 - - - - - - - - - - - - - - - 2
1 - - - - - - - - - - - - - - - 1
A B C D E F G H J K L M N O P
Rules at: http://www.gamerz.net/pbmserv/Gomoku.html
Graphics: http://www.math.lsu.edu/~wamelen/gamerz/Gomoku/Gomoku.php?6&html
Segmentation fault (core dumped)