Changeset 6915758 in rtems-libbsd for ipsec-tools/src/racoon/session.c


Ignore:
Timestamp:
06/10/22 05:58:11 (21 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
dd3f119
Parents:
8952450
git-author:
Sebastian Huber <sebastian.huber@…> (06/10/22 05:58:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/22/22 15:25:57)
Message:

ipsec-tools: Do not use signals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipsec-tools/src/racoon/session.c

    r8952450 r6915758  
    120120#define NUM_PRIORITIES 2
    121121
     122#ifndef __rtems__
    122123static void close_session __P((void));
    123124static void initfds __P((void));
     
    127128static void check_flushsa __P((void));
    128129static int close_sockets __P((void));
     130#endif /* __rtems__ */
    129131
    130132#ifndef __rtems__
     
    141143static int nfds = 0;
    142144
     145#ifndef __rtems__
    143146static volatile sig_atomic_t sigreq[NSIG + 1];
    144147static struct sched scflushsa = SCHED_INITIALIZER();
     148#endif /* __rtems__ */
    145149
    146150void
     
    200204        struct timeval *timeout;
    201205        int error;
     206#ifndef __rtems__
    202207        char pid_file[MAXPATHLEN];
    203208        FILE *fp;
    204209        pid_t racoon_pid = 0;
     210#endif /* __rtems__ */
    205211        int i, count;
    206212        struct fd_monitor *fdm;
     
    229235        /* initialize schedular */
    230236        sched_init();
     237#ifndef __rtems__
    231238        init_signal();
     239#endif /* __rtems__ */
    232240
    233241        if (pfkey_init() < 0)
     
    326334        fprintf(fp, "%ld\n", (long)racoon_pid);
    327335        fclose(fp);
    328 #endif /* __rtems__ */
    329336
    330337        for (i = 0; i <= NSIG; i++)
    331338                sigreq[i] = 0;
     339#endif /* __rtems__ */
    332340
    333341        while (1) {
     342#ifndef __rtems__
    334343                /*
    335344                 * asynchronous requests via signal.
     
    337346                 */
    338347                check_sigreq();
     348#endif /* __rtems__ */
    339349
    340350                /* scheduling */
     
    380390}
    381391
     392#ifndef __rtems__
    382393/* clear all status and exit program. */
    383394static void
     
    392403        close_sockets();
    393404        backupsa_clean();
    394 #ifdef __rtems__
    395         free(allocated_preset_mask); allocated_preset_mask = NULL;
    396         free(allocated_active_mask); allocated_active_mask = NULL;
    397         free(allocated_fd_monitors); allocated_fd_monitors = NULL;
    398 #endif /* __rtems__ */
    399405
    400406        plog(LLV_INFO, LOCATION, NULL, "racoon process %d shutdown\n", getpid());
     
    566572        memset((caddr_t)&sa, 0, sizeof(sa));
    567573        sa.sa_handler = func;
    568 #ifndef __rtems__
    569574        sa.sa_flags = SA_RESTART;
    570 #else /* __rtems__ */
    571         sa.sa_flags = 0;
    572 #endif /* __rtems__ */
    573575
    574576        if (sigemptyset(&sa.sa_mask) < 0)
     
    591593        return 0;
    592594}
     595#endif /* __rtems__ */
    593596
    594597#ifdef __rtems__
Note: See TracChangeset for help on using the changeset viewer.