Re: Fwd: [squid-users] Squid redirect problem

From: Adam Smith <adam@dont-contact.us>
Date: Sun, 1 Feb 2004 22:26:58 +1030

On Sat, Jan 31, 2004 at 08:51:06PM -0500, mortbox@gamebox.net said:
> i've asked to be removed countless times. here's another message that
> i didn't want. it's really not that hard to remove somebody is it...

Perhaps instead of asking to be removed, you should unsubscribe.

MAYBE if you sent the appropriate email to
squid-users-unsubscribe@squid-cache.org and then unsubscribed you wouldn't
have to be an idiot. And perhaps if there is a problem with the
unsubscription service which is preventing you from unsubscribing, you
could contact the list administrators by emailing
squid-users-help@squid-cache.org.

And if maybe for some reason noone is answering your queries, you could
post a general message to this list instead of annoying the shit out of
everyone by forwarding all their emails back to the list.

Good day.

>
> This is a forwarded message
> From: Deepa D <deepndharma@yahoo.co.in>
> To: Henrik Nordstrom <hno@squid-cache.org>
> Date: Saturday, January 31, 2004, 5:54:08 AM
> Subject: [squid-users] Squid redirect problem
>
> ===8<==============Original message text===============
> Hi,
> Sorry the delay.
> I have pasted the code to this mail.
> Kindly let me know if there is any problem in it.
>
> int sig_hup = 0;
>
> int main (int argc, char *argv[]) {
>
> int sd, rc;
> struct sockaddr_in localAddr, servAddr;
> struct hostent *h;
>
> char buff[MAX_BUFF] = "";
> int nread = 0;
>
> h = gethostbyname("127.0.0.1");
> if(h == NULL) {
> log(LOG_ERROR, " Client - unknown host\n ");
> exit(1);
> }
>
> servAddr.sin_family = h->h_addrtype;
> memcpy((char *) &servAddr.sin_addr.s_addr,
> h->h_addr_list[0], h->h_length);
> servAddr.sin_port = htons(SERVER_PORT);
>
> while(!sig_hup) {
>
> if(fgets(buff, MAX_BUFF, stdin) != NULL) {
>
> /* create socket */
> sd = socket(AF_INET, SOCK_STREAM, 0);
> if(sd < 0) {
> log(LOG_ERROR, " Client - cannot open socket\n ");
> exit(1);
> }
>
>
> /* bind any port number */
> localAddr.sin_family = AF_INET;
> localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
> localAddr.sin_port = htons(0);
>
> rc = bind(sd, (struct sockaddr *) &localAddr,
> sizeof(localAddr));
> if(rc < 0) {
> log(LOG_ERROR, " Client - cannot bind to
> SERVER_PORT\n ");
> exit(1);
> }
>
>
> rc = connect(sd, (struct sockaddr *) &servAddr,
> sizeof(servAddr));
> if(rc < 0) {
> log(LOG_ERROR, " Client - could not connect to the
> server\n ");
> exit(1);
> }
>
> if(strchr(buff, '\n') == NULL) {
> /* Append a new line character so that the data
> gets flushed. */
> strcat(buff,"\n");
> }
> if(write(sd , buff , strlen(buff)) < 0) {
> log(LOG_ERROR," Client - error while writing to
> server.\n ");
> } else {
> logger1(LOG_INFO," Client - wrote to server = ",
> buff);
> }
>
> memset(buff,'\0',MAX_BUFF);
> nread = read(sd, buff, MAX_BUFF);
> puts(buff);
> fflush(stdout);
> close(sd);
> }
>
> // The client exits when it reads an EOF from stdin.
> exit(0);
>
> }
> *buff = '\0';
> return 0;
>
> }
>
> void contentfilter_HUP(int signal) {
>
> /* exciting bit of code this one :-) */
> sig_hup = 1;
> log(LOG_INFO, "sigHUP received.
> Reconfiguring....\n");
> }
>
>
> Regards,
> Deepa
>
> --- Henrik Nordstrom <hno@squid-cache.org> wrote: >
> On Mon, 19 Jan 2004, Deepa D wrote:
> >
> > > FATAL: The redirector helpers are crashing
> > too
> > > rapidly, need help!
> > > But, when I don't do exit(0) in my C code once
> > > read from stdin returns null, I don't have this
> > > problem.
> >
> > Then I think you are exiting even if the read does
> > not return EOF.
> >
> > If you want you can post your helper source and we
> > take a look.
> >
> > Regards
> > Henrik
> >
>
> ________________________________________________________________________
> Yahoo! India Mobile: Download the latest polyphonic ringtones.
> Go to http://in.mobile.yahoo.com
> ===8<===========End of original message text===========
>
>
>
> --
> Best regards,
> mortbox mailto:mortbox@gamebox.net
>
>

-- 
Adam Smith	: adam@internode.com.au
Internode	: http://www.internode.on.net
Phone		: (08) 8228 2999
Received on Sun Feb 01 2004 - 05:22:55 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:01 MST