new clients rc.65 on the server
Peter Van Epp
vanepp at sfu.ca
Fri Dec 14 17:38:53 EST 2007
Well the first one was easy enough, but the second I don't know enough
to do anything with:
gcc -g -Wall -Wmissing-prototypes -Wstrict-prototypes -I. -I../include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_VFPRINTF=1 -DHAVE_STRCASECMP=1 -DHAVE_STRDUP=1 -DHAVE_STRFTIME=1 -DHAVE_SETLINEBUF=1 -DHAVE_SETENV=1 -DHAVE_ALARM=1 -DHAVE_GETADDRINFO=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DARGUSDEBUG=1 -D_FILE_OFFSET_BITS=64 -DHAVE_TCP_WRAPPER=1 -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_STRTOF=1 -DARGUS_CURSES=1 -DARGUS_NCURSES_H=1 -DSTDC_HEADERS=1 -DARGUS_SYSLOG -c ./
argus_client.c
./argus_client.c: In function bArgusConnectRemotesb:
./argus_client.c:1856: warning: implicit declaration of function bpthread_attr_initb
./argus_client.c:1856: error: battrb undeclared (first use in this function)
./argus_client.c:1856: error: (Each undeclared identifier is reported only once
./argus_client.c:1856: error: for each function it appears in.)
./argus_client.c:1861: warning: implicit declaration of function bpthread_createb
./argus_client.c:1861: error: bstruct ArgusInputb has no member named btidb
make[1]: *** [argus_client.o] Error 1
make[1]: Leaving directory `/usr/local/src/argus/argus-clients-3.0.0.rc.65/common'
void *
ArgusConnectRemotes (void *arg)
{
struct ArgusQueueStruct *queue = arg;
struct ArgusInput *addr = NULL;
int status, retn, done = 0;
#if defined(ARGUS_THREADS)
pthread_attr_t attr;
#endif
if ((status = pthread_attr_init(&attr)) != 0)
ArgusLog (LOG_ERR, "pthreads init error");
while (!done && !ArgusParser->RaParseDone) {
if ((addr = (struct ArgusInput *) ArgusPopQueue(queue, ARGUS_LOCK)) != NULL) {
if ((retn = pthread_create(&addr->tid, &attr, ArgusConnectRemote, addr)) != 0) {
switch (retn) {
case EAGAIN:
ArgusLog (LOG_ERR, "main: pthread_create ArgusProcessInputList: EAGAIN \n");
break;
case EINVAL:
ArgusLog (LOG_ERR, "main: pthread_create ArgusProcessInputList, EINVAL\n");
break;
}
}
}
sleep(1);
}
although I'll probably try conditionalling out all the pthread stuff
and see what happens reducing to
if ((retn = pthread_create(&addr->tid, &attr, ArgusConnectRemote, addr)
sleep(1);
}
Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada
While I'm here common/argus_main.c needs this for no threads:
*** common/argus_main.c.orig 2007-12-14 14:18:39.000000000 -0800
--- common/argus_main.c 2007-12-14 14:21:45.000000000 -0800
***************
*** 582,589 ****
--- 582,591 ----
if (input->host != NULL)
freeaddrinfo (input->host);
+ #if defined(ARGUS_THREADS)
if (input->tid != (pthread_t) 0)
pthread_join(input->tid, &retn);
+ #endif
ArgusFree(input);
}
More information about the argus
mailing list