]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 10 Jan 2013 01:55:05 +0000 (01:55 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 10 Jan 2013 01:55:05 +0000 (01:55 +0000)
MagickCore/cache.c
MagickCore/distribute-cache-private.h
MagickCore/distribute-cache.c

index 8eb5699a07103dd22e85417f0fbf59529b3f7fe8..d8a27b7d5c53e907f1a5d05f1ffe7286f7f4ce48 100644 (file)
@@ -3841,7 +3841,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
   status=AcquireMagickResource(DiskResource,cache_info->length);
   if (status == MagickFalse)
     {
-      cache_info->distribute_cache_info=AcquireDistributeCacheInfo();
+      cache_info->distribute_cache_info=AcquireDistributeCacheInfo(exception);
       if (cache_info->distribute_cache_info != (DistributeCacheInfo *) NULL)
         return(MagickTrue);
       (void) ThrowMagickException(exception,GetMagickModule(),CacheError,
index 259c8d7810133a1f94788e24d162dfe48aa7d751..232819e69e9782140dcfe0b670a1d2e534eb9a4a 100644 (file)
@@ -22,6 +22,8 @@
 extern "C" {
 #endif
 
+#include "MagickCore/exception.h"
+
 #define MaxNumberDistributedCacheClients  32
 
 typedef struct _DistributeCacheInfo
@@ -40,7 +42,7 @@ typedef struct _DistributeCacheInfo
 } DistributeCacheInfo;
 
 extern MagickPrivate DistributeCacheInfo
-  *AcquireDistributeCacheInfo(void),
+  *AcquireDistributeCacheInfo(ExceptionInfo *),
   *DestroyDistributeCacheInfo(DistributeCacheInfo *);
 
 #endif
index 124929f72b3a1d90b39dee21e2187a6e51797f44..e25fcf2de9e88e960b439c7d9e8abf3e798e50b6 100644 (file)
@@ -57,6 +57,7 @@
 #include "MagickCore/exception.h"
 #include "MagickCore/exception-private.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/registry.h"
 #if defined(MAGICKCORE_HAVE_SOCKET) && defined(MAGICKCORE_HAVE_PTHREAD)
 #include <sys/socket.h>
 #include <netinet/in.h>
 %
 %  The format of the AcquireDistributeCacheInfo method is:
 %
-%      DistributeCacheInfo *AcquireDistributeCacheInfo(void)
+%      DistributeCacheInfo *AcquireDistributeCacheInfo(ExceptionInfo *exception)
+%
+%  A description of each parameter follows:
+%
+%    o exception: return any errors or warnings in this structure.
 %
 */
-MagickPrivate DistributeCacheInfo *AcquireDistributeCacheInfo(void)
+MagickPrivate DistributeCacheInfo *AcquireDistributeCacheInfo(
+  ExceptionInfo *exception)
 {
+#if defined(MAGICKCORE_HAVE_SOCKET) && defined(MAGICKCORE_HAVE_PTHREAD)
+  const char
+    *hosts;
+
   DistributeCacheInfo
     *distribute_cache_info;
 
   distribute_cache_info=(DistributeCacheInfo *) NULL;
-#if defined(MAGICKCORE_HAVE_SOCKET) && defined(MAGICKCORE_HAVE_PTHREAD)
   distribute_cache_info=(DistributeCacheInfo *) AcquireMagickMemory(
     sizeof(*distribute_cache_info));
   if (distribute_cache_info == (DistributeCacheInfo *) NULL)
@@ -95,8 +104,12 @@ MagickPrivate DistributeCacheInfo *AcquireDistributeCacheInfo(void)
   (void) ResetMagickMemory(distribute_cache_info,0,
     sizeof(*distribute_cache_info));
   distribute_cache_info->signature=MagickSignature;
-#endif
+  hosts=GetImageRegistry(StringRegistryType,"cache:hosts",exception);
+  (void) hosts;
   return(distribute_cache_info);
+#else
+  return((DistributeCacheInfo *) NULL);
+#endif
 }
 \f
 /*