Author: rfm
Date: Mon Mar 17 16:55:24 2014
New Revision: 37748

URL: http://svn.gna.org/viewcvs/gnustep?rev=37748&view=rev
Log:
fix ip address matching error

Modified:
    libs/webserver/trunk/WebServer.m

Modified: libs/webserver/trunk/WebServer.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.m?rev=37748&r1=37747&r2=37748&view=diff
==============================================================================
--- libs/webserver/trunk/WebServer.m    (original)
+++ libs/webserver/trunk/WebServer.m    Mon Mar 17 16:55:24 2014
@@ -574,18 +574,18 @@
       if ([pattern length] > 0)
        {
          NSRange       r = [pattern rangeOfString: @"/"];
-         uint32_t      expect;
+         uint32_t      want;
   
          if (0 == r.length)
            {
              /* An IPv4 address in dot format (nnn.nnn.nnn.nnn)
               */
-             parts = [address componentsSeparatedByString: @"."];
-             expect = [[parts objectAtIndex: 0] intValue];
-             expect = expect * 256 + [[parts objectAtIndex: 1] intValue];
-             expect = expect * 256 + [[parts objectAtIndex: 2] intValue];
-             expect = expect * 256 + [[parts objectAtIndex: 3] intValue];
-             if (remote == expect)
+             parts = [pattern componentsSeparatedByString: @"."];
+             want = [[parts objectAtIndex: 0] intValue];
+             want = want * 256 + [[parts objectAtIndex: 1] intValue];
+             want = want * 256 + [[parts objectAtIndex: 2] intValue];
+             want = want * 256 + [[parts objectAtIndex: 3] intValue];
+             if (remote == want)
                {
                  return YES;
                }
@@ -593,7 +593,6 @@
          else
            {
              int           bits;
-             uint32_t      want;
              uint32_t      mask;
              int           i;
 


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to