[Asterisk-code-review] cdr/cdr csv.c: Refactor funcion to write on csv file. (asterisk[master])

Rodrigo Ramirez Norambuena asteriskteam at digium.com
Sun May 3 14:06:02 CDT 2015


Rodrigo Ramirez Norambuena has posted comments on this change.

Change subject: cdr/cdr_csv.c: Refactor funcion to write on csv file.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/319/1//COMMIT_MSG
Commit Message:

Line 7: cdr/cdr_csv.c: Refactor funcion to write on csv file.
      : 
      : Change-Id: Idce707f4c108083252e0aeb948f421d924953e65
> While I appreciate the patches you've done for the CDR backends, you are go
Thanks, i'll consider what you indicated.


https://gerrit.asterisk.org/#/c/319/1/cdr/cdr_csv.c
File cdr/cdr_csv.c:

Line 296: 	if (writefile(buf, csvmaster))
        : 		ast_log(LOG_WARNING, "Unable to write CSV record to master '%s' : %s\n", csvmaster, strerror(errno));
        : 
        : 	if (accountlogs && !ast_strlen_zero(cdr->accountcode)) {
        : 		if (writefile_account(buf, cdr->accountcode))
        : 			ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s' : %s\n", cdr->accountcode, strerror(errno));
        : 	}
> I don't think this is how I would refactor these functions.
But the lock protect the file for write?


-- 
To view, visit https://gerrit.asterisk.org/319
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idce707f4c108083252e0aeb948f421d924953e65
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Rodrigo Ramirez Norambuena <decipher.hk at gmail.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Rodrigo Ramirez Norambuena <decipher.hk at gmail.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list