]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 184630 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 27 Mar 2009 14:04:56 +0000 (14:04 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 27 Mar 2009 14:04:56 +0000 (14:04 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
r184630 | russell | 2009-03-27 09:00:18 -0500 (Fri, 27 Mar 2009) | 2 lines

Change g_eid to ast_eid_default.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184631 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/utils.h
main/asterisk.c
main/event.c
main/pbx.c
pbx/pbx_dundi.c
res/ais/evt.c

index 107444cb9f9dd6e8fa0b8721e3d022b4162aa7c9..cb150ae4eb401bed379387a074789250a9f5b91e 100644 (file)
@@ -688,7 +688,7 @@ struct ast_eid {
  * This is set in asterisk.conf, or determined automatically by taking the mac
  * 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
index c798e0a936099b177c8ad5ea1689e6b056d39e0b..dace537c580cc482e4ef3370aba09fde22593f39 100644 (file)
@@ -162,7 +162,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 */
 char record_cache_dir[AST_CACHE_DIR_LEN] = DEFAULT_TMP_DIR;
@@ -394,7 +394,7 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
                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, "-----------------\n");
@@ -2675,7 +2675,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.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! */
        if (!cfg) {
@@ -2846,7 +2846,7 @@ static void ast_readconfig(void)
                        struct ast_eid tmp_eid;
                        if (!ast_str_to_eid(&tmp_eid, v->value)) {
                                ast_verbose("Successfully set global EID to '%s'\n", v->value);
-                               g_eid = tmp_eid;
+                               ast_eid_default = tmp_eid;
                        } else
                                ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
                }
index 11f022f903670a80da4d49f182c0750f43ffd687..c497bd1f7219cb52219c972bfa1c8740d3c6213b 100644 (file)
@@ -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 the event is originating on this server, add the server's
                 * 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;
index d00ba068789ffd53d031c21e80a71d647b5fbd0c..04cc1480358169af9cd5f52c1e4bb0bda6a313d1 100644 (file)
@@ -2522,7 +2522,7 @@ void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, c
                } else if (!strcmp(var, "SYSTEMNAME")) {
                        s = ast_config_AST_SYSTEM_NAME;
                } else if (!strcmp(var, "ENTITYID")) {
-                       ast_eid_to_str(workspace, workspacelen, &g_eid);
+                       ast_eid_to_str(workspace, workspacelen, &ast_eid_default);
                        s = workspace;
                }
        }
index da2fcf089c81fa077ee7924e0bbfd8d0ef33b967..d86b3ccee9f40459cff16885d53e50ec9975d7f6 100644 (file)
@@ -4667,7 +4667,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_LIST_LOCK(&peers);
 
-       memcpy(&global_eid, &g_eid, sizeof(global_eid));
+       memcpy(&global_eid, &ast_eid_default, sizeof(global_eid));
 
        global_storehistory = 0;
        ast_copy_string(secretpath, "dundi", sizeof(secretpath));
index 7e8c8adf6b114a69fc7a6b556a19c9d249c2c6e4..0bf0361fc30e5328c90382c84d75d8fe6aa302f5 100644 (file)
@@ -141,7 +141,7 @@ void evt_event_deliver_cb(SaEvtSubscriptionIdT sub_id,
                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. */
                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");
 
-       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. */
                ast_log(LOG_DEBUG, "Returning here\n");
                return;