]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
geoip: adapt to 'const' pointer passing
authorVictor Julien <victor@inliniac.net>
Wed, 10 Dec 2014 09:29:48 +0000 (10:29 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 15 Jan 2015 10:52:26 +0000 (11:52 +0100)
src/detect-geoip.c

index 9bdbae0520646845a29ee8f4c2e6238be556c2fb..53c950f88c8275223627ef8801d39295606962e8 100644 (file)
@@ -63,7 +63,7 @@ void DetectGeoipRegister(void)
 
 
 static int DetectGeoipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
-                             Signature *, SigMatchCtx *);
+                             Signature *, const SigMatchCtx *);
 static int DetectGeoipSetup(DetectEngineCtx *, Signature *, char *);
 static void DetectGeoipRegisterTests(void);
 static void DetectGeoipDataFree(void *);
@@ -131,7 +131,7 @@ static const char *GeolocateIPv4(GeoIP *geoengine, uint32_t ip)
  * \retval 0 no match
  * \retval 1 match
  */
-static int CheckGeoMatchIPv4(DetectGeoipData *geoipdata, uint32_t ip)
+static int CheckGeoMatchIPv4(const DetectGeoipData *geoipdata, uint32_t ip)
 {
     const char *country;
     int i;
@@ -165,9 +165,9 @@ static int CheckGeoMatchIPv4(DetectGeoipData *geoipdata, uint32_t ip)
  * \retval 1 match
  */
 static int DetectGeoipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
-                             Packet *p, Signature *s, SigMatchCtx *ctx)
+                             Packet *p, Signature *s, const SigMatchCtx *ctx)
 {
-    DetectGeoipData *geoipdata = (DetectGeoipData *)ctx;
+    const DetectGeoipData *geoipdata = (const DetectGeoipData *)ctx;
     int matches = 0;
 
     if (PKT_IS_PSEUDOPKT(p))