[asterisk-bugs] [JIRA] Commented: (ASTERISK-20157) Code Cleanup in app_alarmreceiver

Kaloyan Kovachev (JIRA) noreply at issues.asterisk.org
Fri Aug 3 06:21:21 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=195451#comment-195451 ] 

Kaloyan Kovachev commented on ASTERISK-20157:
---------------------------------------------

The changes of the code here and in ASTERISK-20158 are fine, but there are some missing curly braces (see Codding Guidelance) and the functions comments should be in Doxygen format.
I would prefer that ademco_verify_checksum() only calculates the checksum and not touch the database, which should be done from caller. Also you may simply do "if (!(checksum = checksum % 15)) return 0;" and similary in the other issue "if (!strncmp(event + 7, ADEMCO_AUDIO_CALL_NEXT, 3)) {"

> Code Cleanup in app_alarmreceiver
> ---------------------------------
>
>                 Key: ASTERISK-20157
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20157
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Applications/app_alarmreceiver
>    Affects Versions: SVN
>            Reporter: Pedro Kiefer
>         Attachments: 0002-Clean-up-load_config-making-it-more-readable.patch, 0003-Extract-constant-number-to-defines.patch, 0004-Clean-up-code.patch, 0005-Remove-checksum-check-out-of-the-receive-Contact-Id-.patch
>
>
> Some cleanups to the alarm receiver code, making it more readable and manageable. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list