%
*/
-static MagickBooleanType CreateDistributeCache(SplayTreeInfo *image_registry,
+static MagickBooleanType DestroyDistributeCache(SplayTreeInfo *image_registry,
+ int file,const MagickSizeType session_key)
+{
+ return(DeleteNodeFromSplayTree(image_registry,(const void *) session_key));
+}
+
+static MagickBooleanType OpenDistributeCache(SplayTreeInfo *image_registry,
int file,const MagickSizeType session_key)
{
ExceptionInfo
return(status);
}
-static MagickBooleanType DestroyDistributeCache(SplayTreeInfo *image_registry,
- int file,const MagickSizeType session_key)
-{
- return(DeleteNodeFromSplayTree(image_registry,(const void *) session_key));
-}
-
static MagickBooleanType ReadDistributeCacheMetacontent(
SplayTreeInfo *image_registry,int file,const MagickSizeType session_key)
{
status=MagickFalse;
switch (command)
{
- case 'c':
+ case 'o':
{
- status=CreateDistributeCache(image_registry,client_socket,session_key);
+ status=OpenDistributeCache(image_registry,client_socket,session_key);
break;
}
case 'r':
session_key);
break;
}
- case 'u':
+ case 'R':
{
- status=WriteDistributeCachePixels(image_registry,client_socket,
+ status=ReadDistributeCacheMetacontent(image_registry,client_socket,
session_key);
break;
}
- case 'd':
+ case 'w':
{
- status=DestroyDistributeCache(image_registry,client_socket,session_key);
+ status=WriteDistributeCachePixels(image_registry,client_socket,
+ session_key);
break;
}
- case 'm':
+ case 'W':
{
- status=ReadDistributeCacheMetacontent(image_registry,client_socket,
+ status=WriteDistributeCacheMetacontent(image_registry,client_socket,
session_key);
break;
}
- case 'M':
+ case 'd':
{
- status=WriteDistributeCacheMetacontent(image_registry,client_socket,
- session_key);
+ status=DestroyDistributeCache(image_registry,client_socket,session_key);
break;
}
default:
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
p=buffer;
- *p++='c'; /* create */
+ *p++='o'; /* open */
(void) memcpy(p,&distribute_cache_info->session_key,
sizeof(distribute_cache_info->session_key));
p+=sizeof(distribute_cache_info->session_key);
assert(metacontent != (unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
- *p++='m'; /* read */
+ *p++='R'; /* read */
(void) memcpy(p,&distribute_cache_info->session_key,
sizeof(distribute_cache_info->session_key));
p+=sizeof(distribute_cache_info->session_key);
assert(metacontent != (unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
- *p++='M'; /* update */
+ *p++='W'; /* write */
(void) memcpy(p,&distribute_cache_info->session_key,
sizeof(distribute_cache_info->session_key));
p+=sizeof(distribute_cache_info->session_key);
assert(pixels != (const unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
- *p++='u'; /* update */
+ *p++='w'; /* write */
(void) memcpy(p,&distribute_cache_info->session_key,
sizeof(distribute_cache_info->session_key));
p+=sizeof(distribute_cache_info->session_key);