prlayer.c revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
7b59d02d2a384be9a08087b14defadd214b3c1ddjb/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb/* ***** BEGIN LICENSE BLOCK *****
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * The contents of this file are subject to the Mozilla Public License Version
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * 1.1 (the "License"); you may not use this file except in compliance with
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the License. You may obtain a copy of the License at
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Software distributed under the License is distributed on an "AS IS" basis,
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * for the specific language governing rights and limitations under the
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * License.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * The Original Code is the Netscape Portable Runtime (NSPR).
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * The Initial Developer of the Original Code is
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Netscape Communications Corporation.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Portions created by the Initial Developer are Copyright (C) 1998-2000
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the Initial Developer. All Rights Reserved.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * Contributor(s):
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Alternatively, the contents of this file may be used under the terms of
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * either the GNU General Public License Version 2 or later (the "GPL"), or
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * in which case the provisions of the GPL or the LGPL are applicable instead
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * of those above. If you wish to allow use of your version of this file only
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * under the terms of either the GPL or the LGPL, and not to allow others to
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * use your version of this file under the terms of the MPL, indicate your
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * decision by deleting the provisions above and replace them with the notice
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * and other provisions required by the GPL or the LGPL. If you do not delete
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the provisions above, a recipient may use your version of this file under
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * the terms of any one of the MPL, the GPL or the LGPL.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * ***** END LICENSE BLOCK ***** */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb** Description: Routines for handling pushable protocol modules on sockets.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb** Default methods that just call down to the next fd.
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * new style stack; close all the layers, before deleting the
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * stack head
7b59d02d2a384be9a08087b14defadd214b3c1ddjb } else if ((fd->higher) && (PR_IO_LAYER_HEAD == fd->higher->identity)) {
8d7e41661dc4633488e93b13363137523ce59977jose borrego * lower layers of new style stack
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * pop and cleanup current layer
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * then call lower layer
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* old style stack */
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRInt32 PR_CALLBACK pl_DefRead (PRFileDesc *fd, void *buf, PRInt32 amount)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->read)(fd->lower, buf, amount);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->write)(fd->lower, buf, amount);
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRInt32 PR_CALLBACK pl_DefAvailable (PRFileDesc *fd)
8d7e41661dc4633488e93b13363137523ce59977jose borregostatic PRInt64 PR_CALLBACK pl_DefAvailable64 (PRFileDesc *fd)
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego return (fd->lower->methods->available64)(fd->lower);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->seek)(fd->lower, offset, how);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->seek64)(fd->lower, offset, how);
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefFileInfo (PRFileDesc *fd, PRFileInfo *info)
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefFileInfo64 (PRFileDesc *fd, PRFileInfo64 *info)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->fileInfo64)(fd->lower, info);
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRInt32 PR_CALLBACK pl_DefWritev (PRFileDesc *fd, const PRIOVec *iov,
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->writev)(fd->lower, iov, size, timeout);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->connect)(fd->lower, addr, timeout);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->connectcontinue)(fd->lower, out_flags);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States{
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PRStatus rv;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(fd != NULL);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States /* test for new style stack */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb newstyle_stack = (PR_IO_LAYER_HEAD == layer->identity) ? PR_TRUE : PR_FALSE;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }
7b59d02d2a384be9a08087b14defadd214b3c1ddjb *newstack = *fd; /* make a copy of the accepting layer */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb newfd = (fd->lower->methods->accept)(fd->lower, addr, timeout);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States /* this PR_PushIOLayer call cannot fail */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States rv = PR_PushIOLayer(newfd, PR_TOP_IO_LAYER, newstack);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(PR_SUCCESS == rv);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return newfd; /* that's it */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefBind (PRFileDesc *fd, const PRNetAddr *addr)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return (fd->lower->methods->bind)(fd->lower, addr);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesstatic PRStatus PR_CALLBACK pl_DefListen (PRFileDesc *fd, PRIntn backlog)
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefShutdown (PRFileDesc *fd, PRIntn how)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States{
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(fd != NULL);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(fd->lower != NULL);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
fc724630b14603e4c1147df68b7bf45f7de7431fAlan Wright return (fd->lower->methods->send)(fd->lower, buf, amount, flags, timeout);
fc724630b14603e4c1147df68b7bf45f7de7431fAlan Wright PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)
fc724630b14603e4c1147df68b7bf45f7de7431fAlan Wright PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->poll)(fd->lower, in_flags, out_flags);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf,
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PRStatus rv;
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* test for new style stack */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb newstyle_stack = (PR_IO_LAYER_HEAD == layer->identity) ? PR_TRUE : PR_FALSE;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States newstack = PR_NEW(PRFileDesc);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return -1;
7b59d02d2a384be9a08087b14defadd214b3c1ddjb *newstack = *sd; /* make a copy of the accepting layer */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (-1 == nbytes)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (newstyle_stack) {
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* this PR_PushIOLayer call cannot fail */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States}
7b59d02d2a384be9a08087b14defadd214b3c1ddjb PRFileDesc *sd, PRFileDesc *fd, const void *headers, PRInt32 hlen,
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefGetsockname (PRFileDesc *fd, PRNetAddr *addr)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(fd != NULL);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->getsockname)(fd->lower, addr);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States}
7b59d02d2a384be9a08087b14defadd214b3c1ddjbstatic PRStatus PR_CALLBACK pl_DefGetpeername (PRFileDesc *fd, PRNetAddr *addr)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States{
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->getpeername)(fd->lower, addr);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (fd->lower->methods->getsocketoption)(fd->lower, data);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return (fd->lower->methods->setsocketoption)(fd->lower, data);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesstatic PRInt32 PR_CALLBACK pl_DefSendfile (
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States}
7b59d02d2a384be9a08087b14defadd214b3c1ddjb/* Methods for the top of the stack. Just call down to the next fd. */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States pl_DefConnect,
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States pl_TopAccept,
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States pl_DefListen,
7b59d02d2a384be9a08087b14defadd214b3c1ddjbPR_IMPLEMENT(const PRIOMethods*) PR_GetDefaultIOMethods(void)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States} /* PR_GetDefaultIOMethods */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb PR_ASSERT((PR_NSPR_IO_LAYER != ident) && (PR_TOP_IO_LAYER != ident));
7b59d02d2a384be9a08087b14defadd214b3c1ddjb if ((PR_NSPR_IO_LAYER == ident) || (PR_TOP_IO_LAYER == ident))
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States return fd;
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* PR_CreateIOLayerStub */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * PR_CreateIOLayer
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Create a new style stack, where the stack top is a dummy header.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * Unlike the old style stacks, the contents of the stack head
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * are not modified when a layer is pushed onto or popped from a new
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego * style stack.
7f667e74610492ddbce8ce60f52ece95d2401949jose borregoPR_IMPLEMENT(PRFileDesc*) PR_CreateIOLayer(PRFileDesc *top)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States fd->methods = &pl_methods;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States top->lower = NULL;
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego} /* PR_CreateIOLayer */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego * _PR_DestroyIOLayer
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States * Delete the stack head of a new style stack.
7f667e74610492ddbce8ce60f52ece95d2401949jose borregostatic PRStatus _PR_DestroyIOLayer(PRFileDesc *stack)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States else {
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* _PR_DestroyIOLayer */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PRFileDesc *stack, PRDescIdentity id, PRFileDesc *fd)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* going on top of the stack */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* old-style stack */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * going somewhere in the middle of the stack for both old and new
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * style stacks, or going on top of stack for new style stack
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States fd->higher = insert->higher;
7b59d02d2a384be9a08087b14defadd214b3c1ddjbPR_IMPLEMENT(PRFileDesc*) PR_PopIOLayer(PRFileDesc *stack, PRDescIdentity id)
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego /* popping top layer of the stack */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego /* old style stack */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego } else if ((PR_IO_LAYER_HEAD == stack->identity) &&
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * new style stack
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * popping the only layer in the stack; delete the stack too
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* for both kinds of stacks */
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* PR_PopIOLayer */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PRIntn length;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesstatic _PRIdentity_cache identity_cache;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjbPR_IMPLEMENT(PRDescIdentity) PR_GetUniqueIdentity(const char *layer_name)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States{
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego PR_ASSERT((PRDescIdentity)0x7fff > identity_cache.ident);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (NULL != layer_name)
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego name = (char*)PR_Malloc(strlen(layer_name) + 1);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjb /* this initial code runs unsafe */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States names = (char**)PR_CALLOC(length * sizeof(char*));
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego /* now we get serious about thread safety */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_Lock(identity_cache.ml);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb PR_ASSERT(identity_cache.ident <= identity_cache.length);
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego if (identity > identity_cache.length) /* there's no room */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego /* we have to do something - hopefully it's already done */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego /* what we did is still okay */
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego PR_ASSERT(identity_cache.ident <= identity_cache.length);
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego PR_ASSERT(identity_cache.ident <= identity_cache.length);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* PR_GetUniqueIdentity */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjbPR_IMPLEMENT(const char*) PR_GetNameForIdentity(PRDescIdentity ident)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb return (ident > identity_cache.ident) ? NULL : identity_cache.name[ident];
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* PR_GetNameForIdentity */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
7b59d02d2a384be9a08087b14defadd214b3c1ddjbPR_IMPLEMENT(PRDescIdentity) PR_GetLayersIdentity(PRFileDesc* fd)
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego} /* PR_GetLayersIdentity */
7f667e74610492ddbce8ce60f52ece95d2401949jose borregoPR_IMPLEMENT(PRFileDesc*) PR_GetIdentitiesLayer(PRFileDesc* fd, PRDescIdentity id)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (id == layer->identity) return layer;
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* PR_GetIdentitiesLayer */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_ASSERT(NULL != identity_cache.ml);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* _PR_InitLayerCache */
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States identity_cache.ml = NULL;
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States }
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States if (identity_cache.name)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb for (ident = 0; ident <= identity_cache.ident; ident++)
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States PR_DELETE(identity_cache.name);
7b59d02d2a384be9a08087b14defadd214b3c1ddjb} /* _PR_CleanupLayerCache */