Skip to content

Commit f8e43f9

Browse files
committed
fix: minor fix
1 parent 80d7ef2 commit f8e43f9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ config_setup_from_cli(int argc, char **argv, struct config *config)
192192
config->storage.C_flag = optarg;
193193
break;
194194
case 'P':
195-
config->storage.P_flag = atoi(optarg);
195+
config->storage.P_flag = strtol(optarg, NULL, 10);
196196
if(config->storage.P_flag == 0){
197197
zsys_error("config: '%s' is not a valid port number", optarg);
198198
goto end;

src/storage_socket.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ socket_store_report(struct storage_module *module, struct payload *payload)
213213
bson_append_document_end(&document, &doc_groups);
214214

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

0 commit comments

Comments
 (0)