automatically shorten the rendezvous name if it's too long

This commit is contained in:
Ron Pedde 2006-12-19 05:06:42 +00:00
parent a3d3c21b65
commit eb92a4b99b
2 changed files with 14 additions and 0 deletions

View File

@ -61,6 +61,8 @@
# define HOST_NAME_MAX 255
#endif
#define MAX_REND_LEN 62
/** Globals */
//static int ecode;
static LL_HANDLE conf_main=NULL;
@ -1713,5 +1715,12 @@ char *conf_get_servername(void) {
}
if(strlen(retval) > MAX_REND_LEN) {
retval[MAX_REND_LEN] = '\0';
retval[MAX_REND_LEN-1] = '.';
retval[MAX_REND_LEN-2] = '.';
retval[MAX_REND_LEN-3] = '.';
}
return retval;
}

View File

@ -24,6 +24,11 @@
#include "ff-dbstruct.h"
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
/* Plugin types */
#define PLUGIN_OUTPUT 1
#define PLUGIN_SCANNER 2