Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6524)

Issue 27270044: Carrierroute libconfuse remover

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by mariuszbi
Modified:
11 years ago
Reviewers:
lucian.balaceanu
Visibility:
Public.

Description

Carrierroute libconfuse remover

Patch Set 1 #

Total comments: 19
Unified diffs Side-by-side diffs Delta from patch set Stats (+776 lines, -211 lines) Patch
M INSTALL View 1 chunk +0 lines, -2 lines 1 comment Download
M modules/carrierroute/Makefile View 1 chunk +0 lines, -17 lines 0 comments Download
M modules/carrierroute/cr_config.c View 4 chunks +270 lines, -172 lines 6 comments Download
M modules/carrierroute/doc/carrierroute_admin.xml View 1 chunk +0 lines, -15 lines 0 comments Download
A modules/carrierroute/parser_carrierroute.h View 1 chunk +93 lines, -0 lines 6 comments Download
A modules/carrierroute/parser_carrierroute.c View 1 chunk +413 lines, -0 lines 6 comments Download
M pkg/kamailio/deb/debian/control View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/kamailio/deb/lucid/control View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/kamailio/deb/precise/control View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/kamailio/deb/squeeze/control View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/kamailio/deb/wheezy/control View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 2
mariuszbi
https://codereview.appspot.com/27270044/diff/1/INSTALL File INSTALL (left): https://codereview.appspot.com/27270044/diff/1/INSTALL#oldcode129 INSTALL:129: - libconfuse and devel headers - if you want ...
11 years ago (2013-11-16 19:29:11 UTC) #1
mariuszbi
11 years ago (2013-11-23 20:05:24 UTC) #2
Please take another look (PTAL).

Please submit a new CL when addressing the issues.

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config.c
File modules/carrierroute/cr_config.c (right):

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:45: 
The reset and initialization steps should be in the parser_carrierroute.h (there
are internal to the parser)

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:46: #define DEFAULT_DOMAIN_NUM 16
If you increase this to 256, I would consider it safe to remove the check when
the number of domains is surpassed. 256 should be enough for anybody using text
config.

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:216: //sleep(15);
Please remove this dead code (wrong comment)

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:218: /* open source file */
Open configuration file would be clearer. Same below

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:288: if ( rd->domain_num >
allocated_domain_num){
If this would be increased to 256 as a default value this whole blocked would be
redundant....

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/cr_config...
modules/carrierroute/cr_config.c:296: allocated_domain_num =
allocated_domain_num * 2;
allocated_domain_num *= 2

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
File modules/carrierroute/parser_carrierroute.c (right):

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:332: int no_toks, full_line_len, ret;
fix indenting. Set Tab to 4 spaces. Set consistent formatting for the whole
source file.

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:332: int no_toks, full_line_len, ret;
init ret to something different of SUCCESSFULL_PARSING. Left uninitialized it
will be undefined.

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:342: sprintf(format, " %s %%s %%s
%%*s", expected_struct_type);
Use safer snprintf

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:347: {
Be consistent with starting new block Either { is a after a new line for whole
source file or not

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:368: LM_ERR("Unexpected %s token
while waiting for { \n", pch);
pch is not written in this function, it is left uninitialized.

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.c:376: if (( strcmp(str2,"{") != 0) )
strncmp

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
File modules/carrierroute/parser_carrierroute.h (right):

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:71: int 			no_elems; // TBD: name
should suggest int_list_no_elems
Fix spacing

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:72: char			str_buf[CR_MAX_LINE_SIZE];
same as above

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:75: int get_non_blank_line(str* data,
int size, FILE* file, int* full_line_len );
Unnecessary space before )

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:77: int get_option_position(char*
opt_name, option_description* opt_list, int no_options);
const char * opt_name, const option_description* opt_list

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:79: inline int string_not_null(char*
s);
Not used, please remove

https://codereview.appspot.com/27270044/diff/1/modules/carrierroute/parser_ca...
modules/carrierroute/parser_carrierroute.h:83: char* get_non_blankLine(char*
data, int size, FILE* file );
Not defined, not used please remove.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b