Changeset 108 for trunk/src


Ignore:
Timestamp:
Jun 18, 2007, 8:54:05 PM (17 years ago)
Author:
rainer
Message:

Patch for sh_prelude (deinit, exit on failure if daemon), as requested by Yoann V.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_prelude.c

    r106 r108  
    7979 * includes for samhain-specific functions (sl_strstr, sh_error_handle)
    8080 */
    81 #include "slib.h"
     81#include "samhain.h"
    8282#include "sh_cat.h"
    8383#include "sh_error_min.h"
     
    984984        if (initialized < 1)
    985985                return;
    986         prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS);
     986
     987        if (sh.flag.isdaemon == S_TRUE)
     988                prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_FAILURE);
     989        else
     990                prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS);
     991
    987992        client = NULL;
     993
     994        prelude_deinit();
     995
    988996        initialized = 0;
    989997        return;
Note: See TracChangeset for help on using the changeset viewer.