PreviousNext

util.c

Following are the contents of the util.c file, which contains the error message handling routines for the greet_dced server and client.

/*

* util.c

*

* Utility routine(s) shared by "greet_dced" client and server programs.

*/

#include <stdio.h>

#include <dce/nbase.h>

#include <dce/dce_error.h>

void

error_exit(

error_status_t status,

char *text

)

{

unsigned char error_text[100];

int dummy;

dce_error_inq_text(status, error_text, &dummy);

fprintf(stderr, "Error: %s - %s\en", text, error_text);

exit(1);

}