|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 25.7 GB of 70.42 GB (36.49%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
courier-0.66.1/
pcp/
- drwxrwxrwx
|
Viewing file: pcpaddcommon.c (1.68 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
/* ** Copyright 2001 Double Precision, Inc. See COPYING for ** distribution information. */
#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <signal.h> #include <fcntl.h> #include <unistd.h> #include <sys/stat.h> #include "pcp.h"
static int compar_times(const void *a, const void *b) { const struct PCP_event_time *aa=*(const struct PCP_event_time **)a; const struct PCP_event_time *bb=*(const struct PCP_event_time **)b;
return (aa->start < bb->start ? -1: aa->start > bb->start ? 1: aa->end < bb->end ? -1: aa->end > bb->end ? 1:0); }
const struct PCP_event_time ** pcp_add_sort_times(const struct PCP_event_time *t, unsigned n) { const struct PCP_event_time **ptr; unsigned i;
if (n == 0) { errno=EINVAL; return (NULL); }
ptr=malloc(n*sizeof(const struct PCP_event_time *)); if (!ptr) return (NULL);
for (i=0; i<n; i++) ptr[i]=t+i;
if (n) qsort(ptr, n, sizeof(*ptr), compar_times);
for (i=0; i<n; i++) { if (ptr[i]->start > ptr[i]->end) { free(ptr); errno=EINVAL; return (NULL); }
if (i > 0 && ptr[i-1]->end > ptr[i]->start) { free(ptr); errno=EINVAL; return (NULL); } }
return (ptr); }
int pcp_read_saveevent(struct PCP_save_event *ae, char *buf, int bufsize) { int n;
if (ae->write_event_func) return ( ((*ae->write_event_func) (buf, bufsize, ae->write_event_func_misc_ptr)));
if (!ae->write_event_buf && ae->write_event_fd >= 0) return ( read(ae->write_event_fd, buf, bufsize));
if (ae->write_event_buf == 0) { errno=EIO; return (-1); }
for (n=0; n<bufsize && *ae->write_event_buf; n++) buf[n]= *ae->write_event_buf++;
return (n); }
|