Skip to content

Commit

Permalink
fix: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
altor committed Mar 30, 2021
1 parent 80d7ef2 commit f8e43f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ config_setup_from_cli(int argc, char **argv, struct config *config)
config->storage.C_flag = optarg;
break;
case 'P':
config->storage.P_flag = atoi(optarg);
config->storage.P_flag = strtol(optarg, NULL, 10);
if(config->storage.P_flag == 0){
zsys_error("config: '%s' is not a valid port number", optarg);
goto end;
Expand Down
3 changes: 3 additions & 0 deletions src/storage_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ socket_store_report(struct storage_module *module, struct payload *payload)
bson_append_document_end(&document, &doc_groups);

buffer = bson_as_json (&document, &length);
/* buffer[length] = '\r'; */
/* buffer[length + 1] = '\n'; */
/* buffer[length + 2] = '\0'; */
if(buffer == NULL){
zsys_error("socket: failed convert report to json");
ret = -1;
Expand Down

0 comments on commit f8e43f9

Please sign in to comment.