A few more "moremanager" fixes
authorOlle Johansson <oej@edvina.net>
Tue, 27 Nov 2007 21:10:50 +0000 (21:10 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 27 Nov 2007 21:10:50 +0000 (21:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89772 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c
main/dnsmgr.c
main/enum.c
res/res_jabber.c

index e2ac683..3c134e2 100644 (file)
@@ -3073,7 +3073,7 @@ int main(int argc, char *argv[])
        __ast_mm_init();
 #endif 
 
-       ast_startuptime = ast_tvnow();
+       ast_lastreloadtime = ast_startuptime = ast_tvnow();
        ast_cli_register_multiple(cli_asterisk, sizeof(cli_asterisk) / sizeof(struct ast_cli_entry));
 
        if (ast_opt_console) {
index 5d42cd5..ed2426c 100644 (file)
@@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/config.h"
 #include "asterisk/sched.h"
 #include "asterisk/cli.h"
+#include "asterisk/manager.h"
 
 static struct sched_context *sched;
 static int refresh_sched = -1;
@@ -418,6 +419,7 @@ static int do_reload(int loading)
                res = 0;
 
        ast_mutex_unlock(&refresh_lock);
+       manager_event(EVENT_FLAG_SYSTEM, "Reload", "Module: DNSmgr\r\nStatus: %s\r/nMessage: DNSmgr reload Requested\r\n", enabled ? "Enabled" : "Disabled");
 
        return res;
 }
index 15728a7..b545802 100644 (file)
@@ -61,6 +61,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/channel.h"
 #include "asterisk/config.h"
 #include "asterisk/utils.h"
+#include "asterisk/manager.h"
 
 #ifdef __APPLE__
 #undef T_NAPTR
@@ -639,6 +640,7 @@ static int private_enum_init(int reload)
        }
        enumver++;
        ast_mutex_unlock(&enumlock);
+       manager_event(EVENT_FLAG_SYSTEM, "Reload", "Module: Enum\r\nStatus: Enabled\r\nMessage: ENUM reload Requested\r\n");
        return 0;
 }
 
index 716c68f..c5e3bbf 100644 (file)
@@ -2929,14 +2929,14 @@ static int manager_jabber_send(struct mansession *s, const struct message *m)
        }       
        if (strchr(screenname, '@') && message){
                ast_aji_send_chat(client, screenname, message); 
+               astman_append(s, "Response: Success\r\n");
                if (!ast_strlen_zero(id))
                        astman_append(s, "ActionID: %s\r\n",id);
-               astman_append(s, "Response: Success\r\n");
                return 0;
        }
+       astman_append(s, "Response: Error\r\n");
        if (!ast_strlen_zero(id))
                astman_append(s, "ActionID: %s\r\n",id);
-       astman_append(s, "Response: Failure\r\n");
        return 0;
 }