--- dahdi-tools-2.2.1/xpp/astribank_is_starting.c.orig 2010-02-07 13:46:17.000000000 -0600 +++ dahdi-tools-2.2.1/xpp/astribank_is_starting.c 2010-02-07 13:47:23.000000000 -0600 @@ -13,12 +13,11 @@ static const key_t key_astribanks = 0xAB11A0; static int debug; static int verbose; -static int timeout_seconds = 60; static void usage(void) { - fprintf(stderr, "Usage: %s [-d] [-t ] [-a|-r|-w]\n", progname); + fprintf(stderr, "Usage: %s [-d] [-a|-r|-w]\n", progname); exit(1); } @@ -81,7 +80,6 @@ struct sembuf sops; long now; long start_wait; - struct timespec timeout; if((absem = absem_get(0)) < 0) { perror(__FUNCTION__); @@ -91,15 +89,10 @@ sops.sem_op = -1; sops.sem_flg = 0; start_wait = time(NULL); - timeout.tv_sec = timeout_seconds; - timeout.tv_nsec = 0; - if(semtimedop(absem, &sops, 1, &timeout) < 0) { + if(semop(absem, &sops, 1) < 0) { switch(errno) { case EIDRM: /* Removed -- OK */ break; - case EAGAIN: /* Timeout -- Report */ - fprintf(stderr, "Astribanks waiting timed out\n"); - return -errno; default: /* Unexpected errors */ perror("semop"); return -errno; @@ -138,7 +131,6 @@ progname = argv[0]; while (1) { int c; - int t; c = getopt (argc, argv, options); if (c == -1) @@ -152,14 +144,7 @@ verbose++; break; case 't': - t = atoi(optarg); - if(t <= 0) { - fprintf(stderr, - "%s: -t expect a positive number of seconds: '%s'\n", - progname, optarg); - usage(); - } - timeout_seconds = t; + fprintf(stderr, "Option '%c' is deprecated\n", c); break; case 'a': if((val = absem_touch()) < 0) {