Properly install appropriate sound files, prefix spy ones with spy- (bug #5192)
authorMark Spencer <markster@digium.com>
Mon, 12 Sep 2005 03:49:54 +0000 (03:49 +0000)
committerMark Spencer <markster@digium.com>
Mon, 12 Sep 2005 03:49:54 +0000 (03:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6563 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
apps/app_chanspy.c
sounds.txt
sounds/spy-agent.gsm [moved from sounds/agent.gsm with 100% similarity]
sounds/spy-h323.gsm [moved from sounds/h323.gsm with 100% similarity]
sounds/spy-iax.gsm [moved from sounds/iax.gsm with 100% similarity]
sounds/spy-iax2.gsm [moved from sounds/iax2.gsm with 100% similarity]
sounds/spy-mgcp.gsm [moved from sounds/mgcp.gsm with 100% similarity]
sounds/spy-sip.gsm [moved from sounds/sip.gsm with 100% similarity]
sounds/spy-skinny.gsm [moved from sounds/skinny.gsm with 100% similarity]
sounds/spy-zap.gsm [moved from sounds/zap.gsm with 100% similarity]

index ac981e7..caca64f 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -514,7 +514,7 @@ datafiles: all
                        exit 1; \
                fi; \
        done
-       for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-*; do \
+       for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-*; do \
                if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
                        install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
                else \
index 89ee070..f1ae6d2 100755 (executable)
@@ -514,7 +514,7 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
        struct localuser *u;
        struct ast_channel *peer=NULL, *prev=NULL;
        char name[AST_NAME_STRLEN],
-               peer_name[AST_NAME_STRLEN],
+               peer_name[AST_NAME_STRLEN + 5],
                *args,
                *ptr = NULL,
                *options = NULL,
@@ -643,8 +643,8 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
                                        if (peer && (!bronly || ast_bridged_channel(peer)) &&
                                            !ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {
                                                int x = 0;
-
-                                               strncpy(peer_name, peer->name, AST_NAME_STRLEN);
+                                               strncpy(peer_name, "spy-", 5);
+                                               strncpy(peer_name + strlen(peer_name), peer->name, AST_NAME_STRLEN);
                                                ptr = strchr(peer_name, '/');
                                                *ptr = '\0';
                                                ptr++;
index a8a1657..0686554 100755 (executable)
 %conf-onlyone.gsm%There is currently only one other participant in the conference.
 
 
-%agent.gsm%Agent
+%spy-agent.gsm%Agent
 
-%h323.gsm%H.323
+%spy-h323.gsm%H.323
 
-%iax.gsm%IAX
+%spy-iax.gsm%IAX
 
-%iax2.gsm%IAX (note: does not say "2")
+%spy-iax2.gsm%IAX (note: does not say "2")
 
-%mgcp.gsm%MGCP
+%spy-mgcp.gsm%MGCP
 
-%sip.gsm%SIP
+%spy-sip.gsm%SIP
 
-%skinny.gsm%Skinny
+%spy-skinny.gsm%Skinny
 
-%zap.gsm%Zap
+%spy-zap.gsm%Zap
similarity index 100%
rename from sounds/agent.gsm
rename to sounds/spy-agent.gsm
similarity index 100%
rename from sounds/h323.gsm
rename to sounds/spy-h323.gsm
similarity index 100%
rename from sounds/iax.gsm
rename to sounds/spy-iax.gsm
similarity index 100%
rename from sounds/iax2.gsm
rename to sounds/spy-iax2.gsm
similarity index 100%
rename from sounds/mgcp.gsm
rename to sounds/spy-mgcp.gsm
similarity index 100%
rename from sounds/sip.gsm
rename to sounds/spy-sip.gsm
similarity index 100%
rename from sounds/skinny.gsm
rename to sounds/spy-skinny.gsm
similarity index 100%
rename from sounds/zap.gsm
rename to sounds/spy-zap.gsm