summaryrefslogtreecommitdiff
path: root/src/server_set.c
diff options
context:
space:
mode:
authorJakub Sławiński2006-02-05 15:14:03 +0100
committerJoshua Judson Rosen2014-07-17 21:15:02 +0200
commitb457fec36399c1f7de093d5e92bb4fa453b79c86 (patch)
tree2084c9a78d40213015e6f10e3e9e01bc4c0c51f1 /src/server_set.c
parentUpdate copyright statements. (diff)
downloadapf-b457fec36399c1f7de093d5e92bb4fa453b79c86.tar.gz
v0.8
- Fixed: infinite loop after buffering message - Fixed: corrupt packets after closing connections in the stopped state - Fixed: bug in mapping user numbers between afclient and afserver - Fixed: premature close of the service connection - Fixed: invalid buffering when the connection is closing - Added: Multiple tunnels in one afclient<->afserver connection
Diffstat (limited to 'src/server_set.c')
-rw-r--r--src/server_set.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server_set.c b/src/server_set.c
index 9b04f33..0e9252e 100644
--- a/src/server_set.c
+++ b/src/server_set.c
@@ -19,12 +19,24 @@
*/
#include <stdlib.h>
+#include <assert.h>
#include "string_functions.h"
+/*
+ * Function name: set_value
+ * Description: If the variable has no value, set it from the given string.
+ * If the given string is NULL, use default value.
+ * Arguments: dest - the destination variable
+ * from - the given string
+ * def - the default value
+ */
+
void
set_value(char** dest, char* from, char* def)
{
+ assert(dest != NULL);
+
if ((*dest) == NULL) {
if (from != NULL) {
string_cp(dest, from);