[asterisk-dev] Bug #0014208 closed but code not changes in current asterisk versions

Tobias Wolf tobias.wolf at evision.de
Thu Feb 12 07:30:55 CST 2009


Hello,

i had an issue with originating a call per Manager Interface and got the info 
what to change in manager.c to get rid of it. The proposed change works fine.
I got also a link to the named bug in the bug tracker, where exactly the same 
issue was described with the correct solution.

But ...

Last Update of the Bug was 2009-01-27 21:17 with Resolution fixed.

In Asterisk 1.6.0-beta4 the bug was not present.

The last comment assumed that the patch will be committed to 1.6.0.4

I have downloaded 1.6.0.5 but the bug is still present.

Can someone shed some light, what has happened?

I had a look at the code in question from manager.c

>         if (!ast_strlen_zero(name)) {
>                 astman_send_error(s, m, "Channel not specified");
>                 return 0;
>         }
>         if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
>                 if ((pi = ast_findlabel_extension(NULL, context, exten,           
>                      priority, NULL)) < 1) {
>                         astman_send_error(s, m, "Invalid priority");
>                         return 0;
>                 }
>         }
>         if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%d", &to) != 1)) {
>                 astman_send_error(s, m, "Invalid timeout");
>                 return 0;
>         }

You have to remove the '!' in the first check to get the correct functionality.

If my assumption is right, that ast_strlen_zero(string) returns true if string 
has a length of zero and otherwise false, i think one needs also to look at the 
other if-statements. If i don't set the priority ast_strlen_zero evaluates to 
true, which make false and the rest will nether gets executed.

But naturally i can be wrong altogether here ;)

Kind Regards,

Tobias Wolf




More information about the asterisk-dev mailing list