Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Apache mod_rewrite for firewall connection
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
kaneza



Joined: 09 May 2008
Posts: 31

PostPosted: Fri Apr 10, 2009 4:45 pm    Post subject: Reply with quote

i tried it and i am still getting errors while compiling...
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Apr 10, 2009 4:53 pm    Post subject: Reply with quote

and? you replaced the symbol with a string literal string so the compiler will not be complaining about it unless you are not doing the change or giving correct reports. The change I suggested is fairly minor.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kaneza



Joined: 09 May 2008
Posts: 31

PostPosted: Fri Apr 10, 2009 4:57 pm    Post subject: Reply with quote

Here is my code now
Code:

  const char *ip;
 
  ip = client->con->ip;
if (strcmp (ip, "127.0.0.1") !== 0)
{
     const char *ipaddrk = httpp_getvar (client->parser,"X_FORWARDED_FOR");
    if (ipaddrk)
       ip = ipaddrk;
}
ipaddr = util_url_escape (ip);
 


when i compile i get error ipaddrk not defined and i add it, so the code becomes

Code:

  const char *ip;
const char *ipaddrk; 
  ip = client->con->ip;
if (strcmp (ip, "127.0.0.1") !== 0)
{
     const char *ipaddrk = httpp_getvar (client->parser,"X_FORWARDED_FOR");
    if (ipaddrk)
       ip = ipaddrk;
}
ipaddr = util_url_escape (ip);
 


still i get errors while compiling
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Apr 10, 2009 5:03 pm    Post subject: Reply with quote

you'll have to be more forthcoming if you want other people to fix the problem. ipaddrk is within the if and defined as a const char *, it is not referenced outside of the if. Check your C reference material. I'm not sure why you are changing the if expression either.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kaneza



Joined: 09 May 2008
Posts: 31

PostPosted: Fri Apr 10, 2009 5:06 pm    Post subject: Reply with quote

i changed it because it seemed not to work and i was tryin to work around it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber