Commit 9ea99d68 authored by Ian Murdock's avatar Ian Murdock
Browse files

Updated to new event_register() interface.

parent d4027060
/* test-consume.c: Test delivery of events, with attributes (consumer). */
static char rcsid[] = "$Id: test-attr-consume.c,v 1.1 2001-11-02 04:47:14 imurdock Exp $";
static char rcsid[] = "$Id: test-attr-consume.c,v 1.2 2001-11-06 17:24:16 imurdock Exp $";
#include <event.h>
......@@ -11,9 +11,22 @@ int
main(int argc, char **argv)
{
event_handle_t handle;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register();
handle = event_register(server);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
......
/* test-attr-produce.c: Test delivery of events, with attributes (producer). */
static char rcsid[] = "$Id: test-attr-produce.c,v 1.1 2001-11-02 04:47:14 imurdock Exp $";
static char rcsid[] = "$Id: test-attr-produce.c,v 1.2 2001-11-06 17:24:16 imurdock Exp $";
#include <event.h>
......@@ -9,9 +9,22 @@ main(int argc, char **argv)
{
event_handle_t handle;
event_notification_t notification;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register();
handle = event_register(server);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
......
/* test-consume.c: Test delivery of events (consumer). */
static char rcsid[] = "$Id: test-consume.c,v 1.1 2001-11-02 04:47:14 imurdock Exp $";
static char rcsid[] = "$Id: test-consume.c,v 1.2 2001-11-06 17:24:16 imurdock Exp $";
#include <event.h>
......@@ -11,9 +11,22 @@ int
main(int argc, char **argv)
{
event_handle_t handle;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register();
handle = event_register(server);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
......
/* test-produce.c: Test delivery of events (producer). */
static char rcsid[] = "$Id: test-produce.c,v 1.1 2001-11-02 04:47:14 imurdock Exp $";
static char rcsid[] = "$Id: test-produce.c,v 1.2 2001-11-06 17:24:16 imurdock Exp $";
#include <event.h>
......@@ -9,9 +9,22 @@ main(int argc, char **argv)
{
event_handle_t handle;
event_notification_t notification;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register();
handle = event_register(server);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment