summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--qarsh.spec2
-rw-r--r--qarsh_packet.c26
3 files changed, 10 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 89bdeb2..428c6f7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.PHONY: clean clobber uninstall
-CFLAGS := -Wall -g -I/usr/include/libxml2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+CFLAGS := -Wall -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
COMMON := qarsh_packet.c sockutil.c
@@ -12,7 +12,6 @@ all: $(TARGETS)
qarshd: qarshd.c $(COMMON)
qarsh: qarsh.c $(COMMON) btime.c hbeat.c
qacp: qacp.c $(COMMON)
-qarshd qarsh qacp: LOADLIBES := -lxml2
btimed: btimed.c
btimec: btimec.c btime.c
diff --git a/qarsh.spec b/qarsh.spec
index b4278a6..3c73e9a 100644
--- a/qarsh.spec
+++ b/qarsh.spec
@@ -5,7 +5,7 @@ Release: 1%{?dist}
Group: Applications/Internet
License: GPL
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-BuildRequires: libxml2-devel, systemd
+BuildRequires: systemd
Source0: qarsh-%{version}.tar.bz2
diff --git a/qarsh_packet.c b/qarsh_packet.c
index dfd6e72..ffaf35a 100644
--- a/qarsh_packet.c
+++ b/qarsh_packet.c
@@ -27,15 +27,14 @@
*
*/
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <sys/wait.h>
#include <stdint.h>
#include <endian.h>
-#include <libxml/parser.h>
-#include <libxml/xpath.h>
-
#include "qarsh_packet.h"
/* Prototypes */
@@ -159,15 +158,6 @@ struct packet_internals {
#define QP_TYPES (sizeof qa_pi / sizeof *qa_pi)
#define QP_NAME(n) qa_pi[n].pi_name
-
-/* XML Strings */
-const xmlChar *QP_QARSH_XML = (xmlChar *)"qarsh";
-const xmlChar *QP_PACKET_XML = (xmlChar *)"packet";
-const xmlChar *QP_TYPE_XML = (xmlChar *)"type";
-const xmlChar *QP_PARAM_XML = (xmlChar *)"param";
-const xmlChar *QP_NAME_XML = (xmlChar *)"name";
-const xmlChar *QP_SEQ_XML = (xmlChar *)"seq";
-
enum qa_packet_type
parse_packet_type(char *s)
{
@@ -268,7 +258,7 @@ parse_qp_runcmd(char *buf, int *buflen, struct qa_packet *qp)
void
parse_qp_ack(char *buf, int *buflen, struct qa_packet *qp)
{
- buf = fetch_int(buf, buflen, &(qp->qp_ack.qp_ack_type));
+ buf = fetch_int(buf, buflen, (int *)&(qp->qp_ack.qp_ack_type));
buf = fetch_int(buf, buflen, &(qp->qp_ack.qp_ack_seq));
}
@@ -299,7 +289,7 @@ parse_qp_recvfile(char *buf, int *buflen, struct qa_packet *qp)
buf = fetch_string(buf, buflen, &(qp->qp_recvfile.qp_path));
buf = fetch_int(buf, buflen, &(qp->qp_recvfile.qp_if_port));
buf = fetch_off_t(buf, buflen, &(qp->qp_recvfile.qp_count));
- buf = fetch_int(buf, buflen, &(qp->qp_recvfile.qp_mode));
+ buf = fetch_int(buf, buflen, (int *)&(qp->qp_recvfile.qp_mode));
}
void
@@ -314,9 +304,9 @@ parse_qp_rstat(char *buf, int *buflen, struct qa_packet *qp)
{
buf = fetch_string(buf, buflen, &(qp->qp_rstat.qp_path));
- buf = fetch_int(buf, buflen, &(qp->qp_rstat.qp_st_mode));
- buf = fetch_int(buf, buflen, &(qp->qp_rstat.qp_st_uid));
- buf = fetch_int(buf, buflen, &(qp->qp_rstat.qp_st_gid));
+ buf = fetch_int(buf, buflen, (int *)&(qp->qp_rstat.qp_st_mode));
+ buf = fetch_int(buf, buflen, (int *)&(qp->qp_rstat.qp_st_uid));
+ buf = fetch_int(buf, buflen, (int *)&(qp->qp_rstat.qp_st_gid));
buf = fetch_off_t(buf, buflen, &(qp->qp_rstat.qp_st_size));
}
@@ -331,7 +321,7 @@ parse_packet(char *buf, int buflen)
memset(qp, 0, sizeof *qp);
buf = fetch_int(buf, &buflen, &(qp->qp_seq));
- buf = fetch_int(buf, &buflen, &(qp->qp_type));
+ buf = fetch_int(buf, &buflen, (int *)&(qp->qp_type));
if (qa_pi[qp->qp_type].pi_parse)
qa_pi[qp->qp_type].pi_parse(buf, &buflen, qp);