Change g_eid to ast_eid_default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
1cd4ecd0b7
commit
b564b2105f
|
@ -688,7 +688,7 @@ struct ast_eid {
|
||||||
* This is set in asterisk.conf, or determined automatically by taking the mac
|
* This is set in asterisk.conf, or determined automatically by taking the mac
|
||||||
* address of an Ethernet interface on the system.
|
* address of an Ethernet interface on the system.
|
||||||
*/
|
*/
|
||||||
extern struct ast_eid g_eid;
|
extern struct ast_eid ast_eid_default;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Fill in an ast_eid with the default eid of this machine
|
* \brief Fill in an ast_eid with the default eid of this machine
|
||||||
|
|
|
@ -182,7 +182,7 @@ long option_minmemfree; /*!< Minimum amount of free system memory - stop acce
|
||||||
|
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
||||||
struct ast_eid g_eid;
|
struct ast_eid ast_eid_default;
|
||||||
|
|
||||||
/* XXX tmpdir is a subdir of the spool directory, and no way to remap it */
|
/* XXX tmpdir is a subdir of the spool directory, and no way to remap it */
|
||||||
char record_cache_dir[AST_CACHE_DIR_LEN] = DEFAULT_TMP_DIR;
|
char record_cache_dir[AST_CACHE_DIR_LEN] = DEFAULT_TMP_DIR;
|
||||||
|
@ -427,7 +427,7 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_eid_to_str(eid_str, sizeof(eid_str), &g_eid);
|
ast_eid_to_str(eid_str, sizeof(eid_str), &ast_eid_default);
|
||||||
|
|
||||||
ast_cli(a->fd, "\nPBX Core settings\n");
|
ast_cli(a->fd, "\nPBX Core settings\n");
|
||||||
ast_cli(a->fd, "-----------------\n");
|
ast_cli(a->fd, "-----------------\n");
|
||||||
|
@ -2817,7 +2817,7 @@ static void ast_readconfig(void)
|
||||||
ast_copy_string(cfg_paths.socket_path, DEFAULT_SOCKET, sizeof(cfg_paths.socket_path));
|
ast_copy_string(cfg_paths.socket_path, DEFAULT_SOCKET, sizeof(cfg_paths.socket_path));
|
||||||
ast_copy_string(cfg_paths.run_dir, DEFAULT_RUN_DIR, sizeof(cfg_paths.run_dir));
|
ast_copy_string(cfg_paths.run_dir, DEFAULT_RUN_DIR, sizeof(cfg_paths.run_dir));
|
||||||
|
|
||||||
ast_set_default_eid(&g_eid);
|
ast_set_default_eid(&ast_eid_default);
|
||||||
|
|
||||||
/* no asterisk.conf? no problem, use buildtime config! */
|
/* no asterisk.conf? no problem, use buildtime config! */
|
||||||
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) {
|
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) {
|
||||||
|
@ -2988,7 +2988,7 @@ static void ast_readconfig(void)
|
||||||
struct ast_eid tmp_eid;
|
struct ast_eid tmp_eid;
|
||||||
if (!ast_str_to_eid(&tmp_eid, v->value)) {
|
if (!ast_str_to_eid(&tmp_eid, v->value)) {
|
||||||
ast_verbose("Successfully set global EID to '%s'\n", v->value);
|
ast_verbose("Successfully set global EID to '%s'\n", v->value);
|
||||||
g_eid = tmp_eid;
|
ast_eid_default = tmp_eid;
|
||||||
} else
|
} else
|
||||||
ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
|
ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
|
||||||
} else if (!strcasecmp(v->name, "lightbackground")) {
|
} else if (!strcasecmp(v->name, "lightbackground")) {
|
||||||
|
|
|
@ -954,7 +954,7 @@ struct ast_event *ast_event_new(enum ast_event_type type, ...)
|
||||||
if (!ast_event_get_ie_raw(event, AST_EVENT_IE_EID)) {
|
if (!ast_event_get_ie_raw(event, AST_EVENT_IE_EID)) {
|
||||||
/* If the event is originating on this server, add the server's
|
/* If the event is originating on this server, add the server's
|
||||||
* entity ID to the event. */
|
* entity ID to the event. */
|
||||||
ast_event_append_ie_raw(&event, AST_EVENT_IE_EID, &g_eid, sizeof(g_eid));
|
ast_event_append_ie_raw(&event, AST_EVENT_IE_EID, &ast_eid_default, sizeof(ast_eid_default));
|
||||||
}
|
}
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
|
|
|
@ -2924,7 +2924,7 @@ void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, c
|
||||||
} else if (!strcmp(var, "SYSTEMNAME")) {
|
} else if (!strcmp(var, "SYSTEMNAME")) {
|
||||||
s = ast_config_AST_SYSTEM_NAME;
|
s = ast_config_AST_SYSTEM_NAME;
|
||||||
} else if (!strcmp(var, "ENTITYID")) {
|
} else if (!strcmp(var, "ENTITYID")) {
|
||||||
ast_eid_to_str(workspace, workspacelen, &g_eid);
|
ast_eid_to_str(workspace, workspacelen, &ast_eid_default);
|
||||||
s = workspace;
|
s = workspace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4614,7 +4614,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin, int reload)
|
||||||
ast_log(LOG_WARNING, "Unable to get host name!\n");
|
ast_log(LOG_WARNING, "Unable to get host name!\n");
|
||||||
AST_LIST_LOCK(&peers);
|
AST_LIST_LOCK(&peers);
|
||||||
|
|
||||||
memcpy(&global_eid, &g_eid, sizeof(global_eid));
|
memcpy(&global_eid, &ast_eid_default, sizeof(global_eid));
|
||||||
|
|
||||||
global_storehistory = 0;
|
global_storehistory = 0;
|
||||||
ast_copy_string(secretpath, "dundi", sizeof(secretpath));
|
ast_copy_string(secretpath, "dundi", sizeof(secretpath));
|
||||||
|
|
|
@ -141,7 +141,7 @@ void evt_event_deliver_cb(SaEvtSubscriptionIdT sub_id,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ast_eid_cmp(&g_eid, ast_event_get_ie_raw(event, AST_EVENT_IE_EID))) {
|
if (!ast_eid_cmp(&ast_eid_default, ast_event_get_ie_raw(event, AST_EVENT_IE_EID))) {
|
||||||
/* Don't feed events back in that originated locally. */
|
/* Don't feed events back in that originated locally. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ static void ast_event_cb(const struct ast_event *ast_event, void *data)
|
||||||
|
|
||||||
ast_log(LOG_DEBUG, "Got an event to forward\n");
|
ast_log(LOG_DEBUG, "Got an event to forward\n");
|
||||||
|
|
||||||
if (ast_eid_cmp(&g_eid, ast_event_get_ie_raw(ast_event, AST_EVENT_IE_EID))) {
|
if (ast_eid_cmp(&ast_eid_default, ast_event_get_ie_raw(ast_event, AST_EVENT_IE_EID))) {
|
||||||
/* If the event didn't originate from this server, don't send it back out. */
|
/* If the event didn't originate from this server, don't send it back out. */
|
||||||
ast_log(LOG_DEBUG, "Returning here\n");
|
ast_log(LOG_DEBUG, "Returning here\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue