-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.69 2004-08-13 10:30:00 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.70 2004-08-16 11:25:53 hadaq Exp $";
#define _POSIX_C_SOURCE 199309L
for (i = 0; i < theArgs->nrOfMsgs; i++) {
ShmTrans_remove(shmTrans[i]);
}
+ finiOnline();
Worker_fini(worker);
exit(EXIT_SUCCESS);
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/online.c,v 6.9 2003-05-14 13:54:45 muench Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/online.c,v 6.10 2004-08-16 11:25:53 hadaq Exp $";
#define _GNU_SOURCE
extern void daqprog_1();
-static struct timeval timeout =
-{0, 0};
+static struct timeval timeout = { 0, 0 };
+
+static SVCXPRT *ourTransp;
initOnline()
{
- register SVCXPRT *transp;
(void) pmap_unset(DAQPROG, DAQVERS);
- transp = svctcp_create(RPC_ANYSOCK, 0, 0);
- if (transp == NULL) {
+ ourTransp = svctcp_create(RPC_ANYSOCK, 0, 0);
+ if (ourTransp == NULL) {
fprintf(stderr, "cannot create tcp service.");
return -1;
}
- if (!svc_register(transp, DAQPROG, DAQVERS, daqprog_1, IPPROTO_TCP)) {
+ if (!svc_register(ourTransp, DAQPROG, DAQVERS, daqprog_1, IPPROTO_TCP)) {
fprintf(stderr, "unable to register (DAQPROG, DAQVERS, tcp).");
return -1;
}
return 0;
}
+int finiOnline(void)
+{
+ svc_unregister(DAQPROG, DAQVERS);
+ svc_destroy(ourTransp);
+}
+
void Evt_online(void *evt)
{
fd_set readfdset;