summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/cli/show_sessions.c2
-rw-r--r--accel-pppd/cli/tcp.c4
-rw-r--r--accel-pppd/cli/telnet.c4
-rw-r--r--accel-pppd/extra/CMakeLists.txt1
4 files changed, 8 insertions, 3 deletions
diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c
index c0fec580..983e6205 100644
--- a/accel-pppd/cli/show_sessions.c
+++ b/accel-pppd/cli/show_sessions.c
@@ -148,7 +148,7 @@ static int show_ses_exec(const char *cmd, char * const *f, int f_cnt, void *cli)
return CLI_CMD_OK;
}
} else if (!strcmp(f[i], "match")) {
- if (i == f_cnt - 1)
+ if (i >= f_cnt - 2)
return CLI_CMD_SYNTAX;
match_key = find_column(f[++i]);
if (!match_key) {
diff --git a/accel-pppd/cli/tcp.c b/accel-pppd/cli/tcp.c
index 9ea914c9..b2ed9105 100644
--- a/accel-pppd/cli/tcp.c
+++ b/accel-pppd/cli/tcp.c
@@ -208,8 +208,10 @@ static int cln_write(struct triton_md_handler_t *h)
_free(cln->xmit_buf);
cln->xmit_pos = 0;
- if (list_empty(&cln->xmit_queue))
+ if (list_empty(&cln->xmit_queue)) {
+ cln->xmit_buf = NULL;
break;
+ }
cln->xmit_buf = list_entry(cln->xmit_queue.next, typeof(*cln->xmit_buf), entry);
list_del(&cln->xmit_buf->entry);
diff --git a/accel-pppd/cli/telnet.c b/accel-pppd/cli/telnet.c
index 314ac9e9..7409767c 100644
--- a/accel-pppd/cli/telnet.c
+++ b/accel-pppd/cli/telnet.c
@@ -518,8 +518,10 @@ static int cln_write(struct triton_md_handler_t *h)
_free(cln->xmit_buf);
cln->xmit_pos = 0;
- if (list_empty(&cln->xmit_queue))
+ if (list_empty(&cln->xmit_queue)) {
+ cln->xmit_buf = NULL;
break;
+ }
cln->xmit_buf = list_entry(cln->xmit_queue.next, typeof(*cln->xmit_buf), entry);
list_del(&cln->xmit_buf->entry);
diff --git a/accel-pppd/extra/CMakeLists.txt b/accel-pppd/extra/CMakeLists.txt
index e7b9f072..cbaef49c 100644
--- a/accel-pppd/extra/CMakeLists.txt
+++ b/accel-pppd/extra/CMakeLists.txt
@@ -1,5 +1,6 @@
ADD_LIBRARY(pppd_compat SHARED pppd_compat.c)
TARGET_LINK_LIBRARIES(pppd_compat sigchld)
+set_property(TARGET pppd_compat PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/accel-ppp)
ADD_LIBRARY(ippool SHARED ippool.c)
ADD_LIBRARY(ipv6pool SHARED ipv6pool.c)
ADD_LIBRARY(sigchld SHARED sigchld.c)