res_stasis_playback: Correct error argument order
authorKinsey Moore <kmoore@digium.com>
Wed, 22 Jan 2014 14:01:07 +0000 (14:01 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 22 Jan 2014 14:01:07 +0000 (14:01 +0000)
Several of the playback error messages for invalid media input in
res_stasis_playback.c had the media name and channel name reversed.
They now correctly identify the channel name and media name.

Reported by: skrusty
........

Merged revisions 406152 from http://svn.asterisk.org/svn/asterisk/branches/12

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

res/res_stasis_playback.c

index f6cd540..c08c2fa 100644 (file)
@@ -320,7 +320,7 @@ static void play_on_channel(struct stasis_app_playback *playback,
 
                if (!recording) {
                        ast_log(LOG_ERROR, "Attempted to play recording '%s' on channel '%s' but recording does not exist",
-                               ast_channel_name(chan), relname);
+                               relname, ast_channel_name(chan));
                        return;
                }
 
@@ -334,7 +334,7 @@ static void play_on_channel(struct stasis_app_playback *playback,
 
                if (sscanf(playback->media + strlen(NUMBER_URI_SCHEME), "%30d", &number) != 1) {
                        ast_log(LOG_ERROR, "Attempted to play number '%s' on channel '%s' but number is invalid",
-                               ast_channel_name(chan), playback->media + strlen(NUMBER_URI_SCHEME));
+                               playback->media + strlen(NUMBER_URI_SCHEME), ast_channel_name(chan));
                        return;
                }
 
@@ -348,7 +348,7 @@ static void play_on_channel(struct stasis_app_playback *playback,
        } else {
                /* Play URL */
                ast_log(LOG_ERROR, "Attempted to play URI '%s' on channel '%s' but scheme is unsupported",
-                       ast_channel_name(chan), playback->media);
+                       playback->media, ast_channel_name(chan));
                return;
        }