Lines Matching refs:p

181 static int lsapi_reopen_stderr(const char *p);
245 char *p = buf; in LSAPI_Log() local
255 p += snprintf(p, 1024, "%04d-%02d-%02d %02d:%02d:%02d.%06d ", in LSAPI_Log()
261 p += snprintf(p, 1024, "%02d:%02d:%02d ", in LSAPI_Log()
269 p += snprintf(p, 100, "[%s] ", s_log_level_names[level]); in LSAPI_Log()
274 p += snprintf(p, 100, "[UID:%d][%d] ", getuid(), s_pid); in LSAPI_Log()
277 if (p > buf) in LSAPI_Log()
278 fprintf(stderr, "%.*s", (int)(p - buf), buf); in LSAPI_Log()
568 struct iovec * p = (struct iovec *)realloc( in allocateIovec() local
570 if ( !p ) in allocateIovec()
572 pReq->m_pIovecToWrite = p + ( pReq->m_pIovecToWrite - pReq->m_pIovec ); in allocateIovec()
573 pReq->m_pIovecCur = p + ( pReq->m_pIovecCur - pReq->m_pIovec ); in allocateIovec()
574 pReq->m_pIovec = p; in allocateIovec()
575 pReq->m_pIovecEnd = p + n; in allocateIovec()
582 char * p = (char *)realloc( pReq->m_pRespHeaderBuf, size ); in allocateRespHeaderBuf() local
583 if ( !p ) in allocateRespHeaderBuf()
585 pReq->m_pRespHeaderBufPos = p + ( pReq->m_pRespHeaderBufPos - pReq->m_pRespHeaderBuf ); in allocateRespHeaderBuf()
586 pReq->m_pRespHeaderBuf = p; in allocateRespHeaderBuf()
587 pReq->m_pRespHeaderBufEnd = p + size; in allocateRespHeaderBuf()
685 char * p = (char *)pInteger; in swapIntEndian() local
687 b = p[0]; in swapIntEndian()
688 p[0] = p[3]; in swapIntEndian()
689 p[3] = b; in swapIntEndian()
690 b = p[1]; in swapIntEndian()
691 p[1] = p[2]; in swapIntEndian()
692 p[2] = b; in swapIntEndian()
699 struct lsapi_req_header *p= pReq->m_pHeader; in fixEndian() local
700 swapIntEndian( &p->m_httpHeaderLen ); in fixEndian()
701 swapIntEndian( &p->m_reqBodyLen ); in fixEndian()
702 swapIntEndian( &p->m_scriptFileOff ); in fixEndian()
703 swapIntEndian( &p->m_scriptNameOff ); in fixEndian()
704 swapIntEndian( &p->m_queryStringOff ); in fixEndian()
705 swapIntEndian( &p->m_requestMethodOff ); in fixEndian()
706 swapIntEndian( &p->m_cntUnknownHeaders ); in fixEndian()
707 swapIntEndian( &p->m_cntEnv ); in fixEndian()
708 swapIntEndian( &p->m_cntSpecialEnv ); in fixEndian()
720 char * p = (char *)(&pReq->m_pHeaderIndex->m_headerLen[i]); in fixHeaderIndexEndian() local
721 b = p[0]; in fixHeaderIndexEndian()
722 p[0] = p[1]; in fixHeaderIndexEndian()
723 p[1] = b; in fixHeaderIndexEndian()
1750 char * p; in LSAPI_ReqBodyGetLine_r() local
1769 p = memchr( pCur, '\n', len ); in LSAPI_ReqBodyGetLine_r()
1770 if ( p ) in LSAPI_ReqBodyGetLine_r()
1771 len = p - pCur + 1; in LSAPI_ReqBodyGetLine_r()
1778 if ( p ) in LSAPI_ReqBodyGetLine_r()
1843 const char * p; in LSAPI_Write_r() local
1880 p = pBuf + skip; in LSAPI_Write_r()
1884 while( ( toWrite = pEnd - p ) > 0 ) in LSAPI_Write_r()
1910 pReq->m_pIovecCur->iov_base = (void *)p; in LSAPI_Write_r()
1913 p += toWrite; in LSAPI_Write_r()
1925 return p - pBuf; in LSAPI_Write_r()
2129 const char * p; in LSAPI_Write_Stderr_r() local
2145 p = pBuf; in LSAPI_Write_Stderr_r()
2148 while( ( packetLen = pEnd - p ) > 0 ) in LSAPI_Write_Stderr_r()
2162 iov[1].iov_base = (void *)p; in LSAPI_Write_Stderr_r()
2164 p += packetLen; in LSAPI_Write_Stderr_r()
2174 return p - pBuf; in LSAPI_Write_Stderr_r()
2200 const char *p; in GetHeaderVar() local
2212 p = &name[5]; in GetHeaderVar()
2214 while(( pKey < pKeyEnd )&&( *p )) in GetHeaderVar()
2217 if ((ch != *p )||(( *p == '_' )&&( ch != '-'))) in GetHeaderVar()
2219 ++p; ++pKey; in GetHeaderVar()
2221 if (( pKey == pKeyEnd )&& (!*p )) in GetHeaderVar()
2377 char *p; in LSAPI_ForeachHeader_r() local
2392 p = &achHeaderName[5]; in LSAPI_ForeachHeader_r()
2398 *p++ = '_'; in LSAPI_ForeachHeader_r()
2400 *p++ = toupper( ch ); in LSAPI_ForeachHeader_r()
2402 *p = 0; in LSAPI_ForeachHeader_r()
2636 char * p = achAddr; in LSAPI_ParseSockAddr() local
2651 switch( *p ) in LSAPI_ParseSockAddr()
2655 strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p, in LSAPI_ParseSockAddr()
2661 ++p; in LSAPI_ParseSockAddr()
2662 pEnd = strchr( p, ']' ); in LSAPI_ParseSockAddr()
2667 if ( *p == '*' ) in LSAPI_ParseSockAddr()
2670 p = achAddr; in LSAPI_ParseSockAddr()
2677 pEnd = strchr( p, ':' ); in LSAPI_ParseSockAddr()
2683 if ( *p == '*' ) in LSAPI_ParseSockAddr()
2687 else if (!strcasecmp( p, "localhost" ) ) in LSAPI_ParseSockAddr()
2692 if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr)) in LSAPI_ParseSockAddr()
2694 ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p ); in LSAPI_ParseSockAddr()
2718 if ( getaddrinfo(p, NULL, &hints, &res) ) in LSAPI_ParseSockAddr()
3848 const char * p = getenv( "LSAPI_DEFAULT_UID" ); in lsapi_initSuEXEC() local
3849 if ( p ) in lsapi_initSuEXEC()
3851 i = atoi( p ); in lsapi_initSuEXEC()
3855 p = getenv( "LSAPI_DEFAULT_GID" ); in lsapi_initSuEXEC()
3856 if ( p ) in lsapi_initSuEXEC()
3858 i = atoi( p ); in lsapi_initSuEXEC()
3862 p = getenv( "LSAPI_SECRET" ); in lsapi_initSuEXEC()
3863 if (( !p )||( readSecret(p) == -1 )) in lsapi_initSuEXEC()
3895 static int lsapi_check_path(const char *p, char *final, int max_len) in lsapi_check_path() argument
3900 if (*p != '/') in lsapi_check_path()
3908 end = memccpy(&final[len], p, '\0', PATH_MAX - len); in lsapi_check_path()
3914 p = final; in lsapi_check_path()
3915 if (realpath(p, resolved_path) == NULL in lsapi_check_path()
3951 static int lsapi_reopen_stderr(const char *p) in lsapi_reopen_stderr() argument
3956 if (lsapi_check_path(p, full_path, PATH_MAX) == -1) in lsapi_reopen_stderr()
3958 LSAPI_perror_r(NULL, "Invalid custom stderr log path", p); in lsapi_reopen_stderr()
3967 const char *p; in LSAPI_Init_Env_Parameters() local
3972 p = getenv("LSAPI_STDERR_LOG"); in LSAPI_Init_Env_Parameters()
3973 if (p) in LSAPI_Init_Env_Parameters()
3975 lsapi_reopen_stderr(p); in LSAPI_Init_Env_Parameters()
3980 p = getenv( "PHP_LSAPI_MAX_REQUESTS" ); in LSAPI_Init_Env_Parameters()
3981 if ( !p ) in LSAPI_Init_Env_Parameters()
3982 p = getenv( "LSAPI_MAX_REQS" ); in LSAPI_Init_Env_Parameters()
3983 if ( p ) in LSAPI_Init_Env_Parameters()
3985 n = atoi( p ); in LSAPI_Init_Env_Parameters()
3990 p = getenv( "LSAPI_KEEP_LISTEN" ); in LSAPI_Init_Env_Parameters()
3991 if ( p ) in LSAPI_Init_Env_Parameters()
3993 n = atoi( p ); in LSAPI_Init_Env_Parameters()
3997 p = getenv( "LSAPI_AVOID_FORK" ); in LSAPI_Init_Env_Parameters()
3998 if ( p ) in LSAPI_Init_Env_Parameters()
4000 avoidFork = atoi( p ); in LSAPI_Init_Env_Parameters()
4004 ch = *(p + strlen(p) - 1); in LSAPI_Init_Env_Parameters()
4014 p = getenv( "LSAPI_ACCEPT_NOTIFY" ); in LSAPI_Init_Env_Parameters()
4015 if ( p ) in LSAPI_Init_Env_Parameters()
4017 s_accept_notify = atoi( p ); in LSAPI_Init_Env_Parameters()
4020 p = getenv( "LSAPI_SLOW_REQ_MSECS" ); in LSAPI_Init_Env_Parameters()
4021 if ( p ) in LSAPI_Init_Env_Parameters()
4023 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4028 p = getenv( "LSAPI_ALLOW_CORE_DUMP" ); in LSAPI_Init_Env_Parameters()
4029 if ( !p ) in LSAPI_Init_Env_Parameters()
4039 p = getenv( "LSAPI_MAX_IDLE" ); in LSAPI_Init_Env_Parameters()
4040 if ( p ) in LSAPI_Init_Env_Parameters()
4042 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4049 p = getenv( "PHP_LSAPI_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4050 if ( !p ) in LSAPI_Init_Env_Parameters()
4051 p = getenv( "LSAPI_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4052 if ( p ) in LSAPI_Init_Env_Parameters()
4053 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4060 p = getenv( "LSAPI_EXTRA_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4061 if ( p ) in LSAPI_Init_Env_Parameters()
4062 LSAPI_Set_Extra_Children( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4064 p = getenv( "LSAPI_MAX_IDLE_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4065 if ( p ) in LSAPI_Init_Env_Parameters()
4066 LSAPI_Set_Max_Idle_Children( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4068 p = getenv( "LSAPI_PGRP_MAX_IDLE" ); in LSAPI_Init_Env_Parameters()
4069 if ( p ) in LSAPI_Init_Env_Parameters()
4071 LSAPI_Set_Server_Max_Idle_Secs( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4074 p = getenv( "LSAPI_MAX_PROCESS_TIME" ); in LSAPI_Init_Env_Parameters()
4075 if ( p ) in LSAPI_Init_Env_Parameters()
4076 LSAPI_Set_Max_Process_Time( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4083 p = getenv("LSAPI_MAX_BUSY_WORKER"); in LSAPI_Init_Env_Parameters()
4084 if (p) in LSAPI_Init_Env_Parameters()
4086 n = atoi(p); in LSAPI_Init_Env_Parameters()
4093 p = getenv( "LSAPI_DUMP_DEBUG_INFO" ); in LSAPI_Init_Env_Parameters()
4094 if ( p ) in LSAPI_Init_Env_Parameters()
4095 s_dump_debug_info = atoi( p ); in LSAPI_Init_Env_Parameters()
4181 unsigned char *p = (unsigned char *) ctx->in + t; in lsapi_MD5Update() local
4185 memmove(p, buf, len); in lsapi_MD5Update()
4188 memmove(p, buf, t); in lsapi_MD5Update()
4217 unsigned char *p; in lsapi_MD5Final() local
4224 p = ctx->in + count; in lsapi_MD5Final()
4225 *p++ = 0x80; in lsapi_MD5Final()
4233 memset(p, 0, count); in lsapi_MD5Final()
4241 memset(p, 0, count - 8); in lsapi_MD5Final()