Removed redundant function.

This commit is contained in:
Markus Makela
2015-08-27 09:32:35 +03:00
parent 501ea809a8
commit 4da9045da4
5 changed files with 5 additions and 16 deletions

View File

@ -92,7 +92,7 @@ static void global_defaults();
static void feedback_defaults(); static void feedback_defaults();
static void check_config_objects(CONFIG_CONTEXT *context); static void check_config_objects(CONFIG_CONTEXT *context);
int config_truth_value(char *str); int config_truth_value(char *str);
static int internalService(char *router); int internalService(char *router);
int config_get_ifaddr(unsigned char *output); int config_get_ifaddr(unsigned char *output);
int config_get_release_string(char* release); int config_get_release_string(char* release);
FEEDBACK_CONF * config_get_feedback_data(); FEEDBACK_CONF * config_get_feedback_data();
@ -2230,7 +2230,7 @@ static char *InternalRouters[] = {
* @param router The router name * @param router The router name
* @return Non-zero if the router is in the InternalRouters table * @return Non-zero if the router is in the InternalRouters table
*/ */
static int int
internalService(char *router) internalService(char *router)
{ {
int i; int i;

View File

@ -2331,7 +2331,7 @@ void valid_service_permissions(SERVICE* service)
SERVER_REF* server; SERVER_REF* server;
int conn_timeout = 1; int conn_timeout = 1;
if(service_is_internal(service)) if(internalService(service->routerModule))
return; return;
if(service->dbref == NULL) if(service->dbref == NULL)

View File

@ -458,7 +458,7 @@ if(service->ssl_mode != SSL_DISABLED)
hktask_add("connection_timeout",session_close_timeouts,NULL,5); hktask_add("connection_timeout",session_close_timeouts,NULL,5);
} }
return listeners; return listeners;
} }
/** /**
@ -2044,14 +2044,3 @@ int serviceInitSSL(SERVICE* service)
} }
return 0; return 0;
} }
/**
* Check if the service is an internal service. Internal services are special
* services which do not require the servers parameter.
* @param service Service to check
* @return True if this service is used only internally
*/
bool service_is_internal(SERVICE* service)
{
return strcmp(service->routerModule,"cli") == 0 || strcmp(service->routerModule,"debugcli") == 0;
}

View File

@ -146,4 +146,5 @@ void config_enable_feedback_task(void);
void config_disable_feedback_task(void); void config_disable_feedback_task(void);
unsigned long config_get_gateway_id(void); unsigned long config_get_gateway_id(void);
GATEWAY_CONF* config_get_global_options(); GATEWAY_CONF* config_get_global_options();
int internalService(char *router);
#endif #endif

View File

@ -246,5 +246,4 @@ void service_shutdown();
extern int serviceSessionCountAll(); extern int serviceSessionCountAll();
extern RESULTSET *serviceGetList(); extern RESULTSET *serviceGetList();
extern RESULTSET *serviceGetListenerList(); extern RESULTSET *serviceGetListenerList();
bool service_is_internal(SERVICE* service);
#endif #endif