Lines Matching refs:p
180 static int lsapi_reopen_stderr(const char *p);
244 char *p = buf; in LSAPI_Log() local
254 p += snprintf(p, 1024, "%04d-%02d-%02d %02d:%02d:%02d.%06d ", in LSAPI_Log()
260 p += snprintf(p, 1024, "%02d:%02d:%02d ", in LSAPI_Log()
268 p += snprintf(p, 100, "[%s] ", s_log_level_names[level]); in LSAPI_Log()
273 p += snprintf(p, 100, "[UID:%d][%d] ", getuid(), s_pid); in LSAPI_Log()
276 if (p > buf) in LSAPI_Log()
277 fprintf(stderr, "%.*s", (int)(p - buf), buf); in LSAPI_Log()
567 struct iovec * p = (struct iovec *)realloc( in allocateIovec() local
569 if ( !p ) in allocateIovec()
571 pReq->m_pIovecToWrite = p + ( pReq->m_pIovecToWrite - pReq->m_pIovec ); in allocateIovec()
572 pReq->m_pIovecCur = p + ( pReq->m_pIovecCur - pReq->m_pIovec ); in allocateIovec()
573 pReq->m_pIovec = p; in allocateIovec()
574 pReq->m_pIovecEnd = p + n; in allocateIovec()
581 char * p = (char *)realloc( pReq->m_pRespHeaderBuf, size ); in allocateRespHeaderBuf() local
582 if ( !p ) in allocateRespHeaderBuf()
584 pReq->m_pRespHeaderBufPos = p + ( pReq->m_pRespHeaderBufPos - pReq->m_pRespHeaderBuf ); in allocateRespHeaderBuf()
585 pReq->m_pRespHeaderBuf = p; in allocateRespHeaderBuf()
586 pReq->m_pRespHeaderBufEnd = p + size; in allocateRespHeaderBuf()
684 char * p = (char *)pInteger; in swapIntEndian() local
686 b = p[0]; in swapIntEndian()
687 p[0] = p[3]; in swapIntEndian()
688 p[3] = b; in swapIntEndian()
689 b = p[1]; in swapIntEndian()
690 p[1] = p[2]; in swapIntEndian()
691 p[2] = b; in swapIntEndian()
698 struct lsapi_req_header *p= pReq->m_pHeader; in fixEndian() local
699 swapIntEndian( &p->m_httpHeaderLen ); in fixEndian()
700 swapIntEndian( &p->m_reqBodyLen ); in fixEndian()
701 swapIntEndian( &p->m_scriptFileOff ); in fixEndian()
702 swapIntEndian( &p->m_scriptNameOff ); in fixEndian()
703 swapIntEndian( &p->m_queryStringOff ); in fixEndian()
704 swapIntEndian( &p->m_requestMethodOff ); in fixEndian()
705 swapIntEndian( &p->m_cntUnknownHeaders ); in fixEndian()
706 swapIntEndian( &p->m_cntEnv ); in fixEndian()
707 swapIntEndian( &p->m_cntSpecialEnv ); in fixEndian()
719 char * p = (char *)(&pReq->m_pHeaderIndex->m_headerLen[i]); in fixHeaderIndexEndian() local
720 b = p[0]; in fixHeaderIndexEndian()
721 p[0] = p[1]; in fixHeaderIndexEndian()
722 p[1] = b; in fixHeaderIndexEndian()
1749 char * p; in LSAPI_ReqBodyGetLine_r() local
1768 p = memchr( pCur, '\n', len ); in LSAPI_ReqBodyGetLine_r()
1769 if ( p ) in LSAPI_ReqBodyGetLine_r()
1770 len = p - pCur + 1; in LSAPI_ReqBodyGetLine_r()
1777 if ( p ) in LSAPI_ReqBodyGetLine_r()
1842 const char * p; in LSAPI_Write_r() local
1879 p = pBuf + skip; in LSAPI_Write_r()
1883 while( ( toWrite = pEnd - p ) > 0 ) in LSAPI_Write_r()
1909 pReq->m_pIovecCur->iov_base = (void *)p; in LSAPI_Write_r()
1912 p += toWrite; in LSAPI_Write_r()
1924 return p - pBuf; in LSAPI_Write_r()
2128 const char * p; in LSAPI_Write_Stderr_r() local
2144 p = pBuf; in LSAPI_Write_Stderr_r()
2147 while( ( packetLen = pEnd - p ) > 0 ) in LSAPI_Write_Stderr_r()
2161 iov[1].iov_base = (void *)p; in LSAPI_Write_Stderr_r()
2163 p += packetLen; in LSAPI_Write_Stderr_r()
2173 return p - pBuf; in LSAPI_Write_Stderr_r()
2199 const char *p; in GetHeaderVar() local
2211 p = &name[5]; in GetHeaderVar()
2213 while(( pKey < pKeyEnd )&&( *p )) in GetHeaderVar()
2216 if ((ch != *p )||(( *p == '_' )&&( ch != '-'))) in GetHeaderVar()
2218 ++p; ++pKey; in GetHeaderVar()
2220 if (( pKey == pKeyEnd )&& (!*p )) in GetHeaderVar()
2376 char *p; in LSAPI_ForeachHeader_r() local
2391 p = &achHeaderName[5]; in LSAPI_ForeachHeader_r()
2397 *p++ = '_'; in LSAPI_ForeachHeader_r()
2399 *p++ = toupper( ch ); in LSAPI_ForeachHeader_r()
2401 *p = 0; in LSAPI_ForeachHeader_r()
2635 char * p = achAddr; in LSAPI_ParseSockAddr() local
2650 switch( *p ) in LSAPI_ParseSockAddr()
2654 strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p, in LSAPI_ParseSockAddr()
2660 ++p; in LSAPI_ParseSockAddr()
2661 pEnd = strchr( p, ']' ); in LSAPI_ParseSockAddr()
2666 if ( *p == '*' ) in LSAPI_ParseSockAddr()
2669 p = achAddr; in LSAPI_ParseSockAddr()
2676 pEnd = strchr( p, ':' ); in LSAPI_ParseSockAddr()
2682 if ( *p == '*' ) in LSAPI_ParseSockAddr()
2686 else if (!strcasecmp( p, "localhost" ) ) in LSAPI_ParseSockAddr()
2691 if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr)) in LSAPI_ParseSockAddr()
2693 ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p ); in LSAPI_ParseSockAddr()
2717 if ( getaddrinfo(p, NULL, &hints, &res) ) in LSAPI_ParseSockAddr()
3847 const char * p = getenv( "LSAPI_DEFAULT_UID" ); in lsapi_initSuEXEC() local
3848 if ( p ) in lsapi_initSuEXEC()
3850 i = atoi( p ); in lsapi_initSuEXEC()
3854 p = getenv( "LSAPI_DEFAULT_GID" ); in lsapi_initSuEXEC()
3855 if ( p ) in lsapi_initSuEXEC()
3857 i = atoi( p ); in lsapi_initSuEXEC()
3861 p = getenv( "LSAPI_SECRET" ); in lsapi_initSuEXEC()
3862 if (( !p )||( readSecret(p) == -1 )) in lsapi_initSuEXEC()
3894 static int lsapi_check_path(const char *p, char *final, int max_len) in lsapi_check_path() argument
3899 if (*p != '/') in lsapi_check_path()
3907 end = memccpy(&final[len], p, '\0', PATH_MAX - len); in lsapi_check_path()
3913 p = final; in lsapi_check_path()
3914 if (realpath(p, resolved_path) == NULL in lsapi_check_path()
3950 static int lsapi_reopen_stderr(const char *p) in lsapi_reopen_stderr() argument
3955 if (lsapi_check_path(p, full_path, PATH_MAX) == -1) in lsapi_reopen_stderr()
3957 LSAPI_perror_r(NULL, "Invalid custom stderr log path", p); in lsapi_reopen_stderr()
3966 const char *p; in LSAPI_Init_Env_Parameters() local
3971 p = getenv("LSAPI_STDERR_LOG"); in LSAPI_Init_Env_Parameters()
3972 if (p) in LSAPI_Init_Env_Parameters()
3974 lsapi_reopen_stderr(p); in LSAPI_Init_Env_Parameters()
3979 p = getenv( "PHP_LSAPI_MAX_REQUESTS" ); in LSAPI_Init_Env_Parameters()
3980 if ( !p ) in LSAPI_Init_Env_Parameters()
3981 p = getenv( "LSAPI_MAX_REQS" ); in LSAPI_Init_Env_Parameters()
3982 if ( p ) in LSAPI_Init_Env_Parameters()
3984 n = atoi( p ); in LSAPI_Init_Env_Parameters()
3989 p = getenv( "LSAPI_KEEP_LISTEN" ); in LSAPI_Init_Env_Parameters()
3990 if ( p ) in LSAPI_Init_Env_Parameters()
3992 n = atoi( p ); in LSAPI_Init_Env_Parameters()
3996 p = getenv( "LSAPI_AVOID_FORK" ); in LSAPI_Init_Env_Parameters()
3997 if ( p ) in LSAPI_Init_Env_Parameters()
3999 avoidFork = atoi( p ); in LSAPI_Init_Env_Parameters()
4003 ch = *(p + strlen(p) - 1); in LSAPI_Init_Env_Parameters()
4013 p = getenv( "LSAPI_ACCEPT_NOTIFY" ); in LSAPI_Init_Env_Parameters()
4014 if ( p ) in LSAPI_Init_Env_Parameters()
4016 s_accept_notify = atoi( p ); in LSAPI_Init_Env_Parameters()
4019 p = getenv( "LSAPI_SLOW_REQ_MSECS" ); in LSAPI_Init_Env_Parameters()
4020 if ( p ) in LSAPI_Init_Env_Parameters()
4022 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4027 p = getenv( "LSAPI_ALLOW_CORE_DUMP" ); in LSAPI_Init_Env_Parameters()
4028 if ( !p ) in LSAPI_Init_Env_Parameters()
4038 p = getenv( "LSAPI_MAX_IDLE" ); in LSAPI_Init_Env_Parameters()
4039 if ( p ) in LSAPI_Init_Env_Parameters()
4041 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4048 p = getenv( "PHP_LSAPI_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4049 if ( !p ) in LSAPI_Init_Env_Parameters()
4050 p = getenv( "LSAPI_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4051 if ( p ) in LSAPI_Init_Env_Parameters()
4052 n = atoi( p ); in LSAPI_Init_Env_Parameters()
4059 p = getenv( "LSAPI_EXTRA_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4060 if ( p ) in LSAPI_Init_Env_Parameters()
4061 LSAPI_Set_Extra_Children( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4063 p = getenv( "LSAPI_MAX_IDLE_CHILDREN" ); in LSAPI_Init_Env_Parameters()
4064 if ( p ) in LSAPI_Init_Env_Parameters()
4065 LSAPI_Set_Max_Idle_Children( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4067 p = getenv( "LSAPI_PGRP_MAX_IDLE" ); in LSAPI_Init_Env_Parameters()
4068 if ( p ) in LSAPI_Init_Env_Parameters()
4070 LSAPI_Set_Server_Max_Idle_Secs( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4073 p = getenv( "LSAPI_MAX_PROCESS_TIME" ); in LSAPI_Init_Env_Parameters()
4074 if ( p ) in LSAPI_Init_Env_Parameters()
4075 LSAPI_Set_Max_Process_Time( atoi( p ) ); in LSAPI_Init_Env_Parameters()
4082 p = getenv("LSAPI_MAX_BUSY_WORKER"); in LSAPI_Init_Env_Parameters()
4083 if (p) in LSAPI_Init_Env_Parameters()
4085 n = atoi(p); in LSAPI_Init_Env_Parameters()
4092 p = getenv( "LSAPI_DUMP_DEBUG_INFO" ); in LSAPI_Init_Env_Parameters()
4093 if ( p ) in LSAPI_Init_Env_Parameters()
4094 s_dump_debug_info = atoi( p ); in LSAPI_Init_Env_Parameters()
4180 unsigned char *p = (unsigned char *) ctx->in + t; in lsapi_MD5Update() local
4184 memmove(p, buf, len); in lsapi_MD5Update()
4187 memmove(p, buf, t); in lsapi_MD5Update()
4216 unsigned char *p; in lsapi_MD5Final() local
4223 p = ctx->in + count; in lsapi_MD5Final()
4224 *p++ = 0x80; in lsapi_MD5Final()
4232 memset(p, 0, count); in lsapi_MD5Final()
4240 memset(p, 0, count - 8); in lsapi_MD5Final()