From: Gilchrist Dadaglo Date: Tue, 8 Dec 2020 14:37:09 +0000 (+0000) Subject: DOC: spoa/python: Rephrasing memory related error messages X-Git-Tag: v2.4-dev3~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85b25829bce67a8d8338350a9bc8845f0ed9c2ad;p=thirdparty%2Fhaproxy.git DOC: spoa/python: Rephrasing memory related error messages The old message "No more space left available" was redundant with "left available". This commit is to rephrase that sentence and make it more explicit we are talking about memory This patch must be backported as far as 2.0. --- diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index ec97f30f50..380d5b39f6 100644 --- a/contrib/spoa_server/ps_python.c +++ b/contrib/spoa_server/ps_python.c @@ -106,7 +106,7 @@ static PyObject *ps_python_set_var_null(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_null(worker, name, name_len_i, scope)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -126,7 +126,7 @@ static PyObject *ps_python_set_var_boolean(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_bool(worker, name, name_len_i, scope, value)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -146,7 +146,7 @@ static PyObject *ps_python_set_var_int32(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_int32(worker, name, name_len_i, scope, value)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -166,7 +166,7 @@ static PyObject *ps_python_set_var_uint32(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_uint32(worker, name, name_len_i, scope, value)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -186,7 +186,7 @@ static PyObject *ps_python_set_var_int64(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_int64(worker, name, name_len_i, scope, value)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -206,7 +206,7 @@ static PyObject *ps_python_set_var_uint64(PyObject *self, PyObject *args) if (name_len_i == -1) return NULL; if (!set_var_uint64(worker, name, name_len_i, scope, value)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -241,7 +241,7 @@ static PyObject *ps_python_set_var_ipv4(PyObject *self, PyObject *args) } memcpy(&ip, PY_STRING_AS_STRING(value), PY_STRING_GET_SIZE(value)); if (!set_var_ipv4(worker, name, name_len_i, scope, &ip)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } /* Once we set the IP value in the worker, we don't need it anymore... */ @@ -278,7 +278,7 @@ static PyObject *ps_python_set_var_ipv6(PyObject *self, PyObject *args) } memcpy(&ip, PY_STRING_AS_STRING(value), PY_STRING_GET_SIZE(value)); if (!set_var_ipv6(worker, name, name_len_i, scope, &ip)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } /* Once we set the IP value in the worker, we don't need it anymore... */ @@ -303,7 +303,7 @@ static PyObject *ps_python_set_var_str(PyObject *self, PyObject *args) if (name_len_i == -1 || value_len_i == -1) return NULL; if (!set_var_string(worker, name, name_len_i, scope, value, value_len_i)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE; @@ -326,7 +326,7 @@ static PyObject *ps_python_set_var_bin(PyObject *self, PyObject *args) if (name_len_i == -1 || value_len_i == -1) return NULL; if (!set_var_bin(worker, name, name_len_i, scope, value, value_len_i)) { - PyErr_SetString(spoa_error, "No space left available"); + PyErr_SetString(spoa_error, "No more memory space available"); return NULL; } Py_RETURN_NONE;