Skip to content

Commit

Permalink
Merge pull request #1374 from atsign-foundation/bump-c-version
Browse files Browse the repository at this point in the history
chore: move version to version.h and bump to 0.2.0
  • Loading branch information
XavierChanth authored Sep 23, 2024
2 parents 86206bb + 06a0d1d commit 216b395
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/c/srv/src/srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int run_srv_daemon_side_multi(srv_params_t *params) {
len = res;
}

if (&control_side.transformer != NULL) {
if (control_side.transformer != NULL) {
unsigned char *output = malloc(4096 * sizeof(unsigned char));
if (output == NULL) {
goto exit;
Expand All @@ -160,7 +160,7 @@ int run_srv_daemon_side_multi(srv_params_t *params) {

// First, check if the buffer contains just one or more requests
size_t nrequests = 0;
res = process_multiple_requests(buffer, &requests, &nrequests);
res = process_multiple_requests((char *)buffer, &requests, &nrequests);
if (res != 0) {
atlogger_log(TAG, ATLOGGER_LOGGING_LEVEL_DEBUG, "Failed to find any request from: %s\n", buffer);
goto exit;
Expand Down Expand Up @@ -445,7 +445,7 @@ static int process_multiple_requests(char *original, char **requests[], size_t *
char **temp_requests = NULL;
size_t temp_count = 0;

while (temp = strtok_r(saveptr, "\n", &saveptr)) {
while ((temp = strtok_r(saveptr, "\n", &saveptr))) {
// realloc memory to save a new pointer
temp_requests = realloc(temp_requests, (temp_count + 1) * sizeof(char *));
if (!temp_requests) {
Expand Down
1 change: 0 additions & 1 deletion packages/c/sshnpd/include/sshnpd/params.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef SSHNPD_PARAMS_H
#define SSHNPD_PARAMS_H
#define SSHNPD_VERSION "0.1.0"

#include <argparse/argparse.h>
#include <getopt.h>
Expand Down
1 change: 0 additions & 1 deletion packages/c/sshnpd/include/sshnpd/sshnpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define SSHNPD_H
#include <unistd.h>

#define SSHNPD_VERSION "0.1.0"
/* Windows Definitions */
#ifdef _WIN32
#define HOMEVAR "USERPROFILE"
Expand Down
4 changes: 4 additions & 0 deletions packages/c/sshnpd/include/sshnpd/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef SSHNPD_VERSION_H
#define SSHNPD_VERSION_H
#define SSHNPD_VERSION "0.2.0"
#endif
1 change: 1 addition & 0 deletions packages/c/sshnpd/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "sshnpd/handle_ssh_request.h"
#include "sshnpd/handle_sshpublickey.h"
#include "sshnpd/sshnpd.h"
#include "sshnpd/version.h"
#include <atchops/aes.h>
#include <atchops/iv.h>
#include <atchops/rsa.h>
Expand Down
1 change: 1 addition & 0 deletions packages/c/sshnpd/src/params.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <sshnpd/params.h>
#include <sshnpd/version.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down

0 comments on commit 216b395

Please sign in to comment.