FACT++  1.0
void dim_dummy_exit_handler ( int *  bufp)

Definition at line 3123 of file feeserver.c.

References createLogMessage(), dis_get_client, fee_exit_handler(), and sprintf().

Referenced by initialize().

3123  {
3124  char msg[200];
3125  char clientName[50];
3126  int dummy = 0;
3127 
3128  // if bufp null pointer, redirect to valid value
3129  if (bufp == 0) {
3130  bufp = &dummy;
3131  }
3132 
3133  // DO almost nothing, just to disable the build-in exit command of the DIM framework
3134  // just notifying about intrusion, except for framework exit
3135  clientName[0] = 0;
3136  dis_get_client(clientName);
3137  // let's asume exit from ambitious user has clientName (pid@host).
3138  if (clientName[0] == 0) {
3139 # ifdef __DEBUG
3140  printf("Framework tries to exit FeeServer (%d)\n", *bufp);
3141  printf("Most likely FeeServer name already exists.\n");
3142  fflush(stdout);
3143 # endif
3144  // IMPORTANT don't use the bufp - state of framework, it could interfere
3145  // with own specified exit states !! (e.g. for restarting in case of "2")
3146  // the same state is signaled by kill all servers of dns !?
3147  fee_exit_handler(204);
3148  } else {
3149  msg[sprintf(msg, "Ambitious user (%s) tried to kill FeeServer, ignoring command!",
3150  clientName)] = 0;
3151  createLogMessage(MSG_WARNING, msg, 0);
3152 # ifdef __DEBUG
3153  printf("Ambitious user (%s) tried to kill FeeServer (%d)\n", clientName, *bufp);
3154  fflush(stdout);
3155 # endif
3156  }
3157 }
void fee_exit_handler(unsigned int state)
Definition: feeserver.c:3109
void createLogMessage(unsigned int type, char *description, char *origin)
Definition: feeserver.c:1530
#define dis_get_client
Definition: dis.h:11
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: