summaryrefslogtreecommitdiffstats
path: root/qarsh_packet.c
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2013-09-11 17:35:01 -0400
committerNathan Straz <nstraz@redhat.com>2013-09-11 17:35:01 -0400
commit38e9c4f1b856b74d72b62437b36333146ad83ee6 (patch)
tree0f108907f5931567ef131328350794b416072553 /qarsh_packet.c
parentbbf62ffff81089ae1ef74d4e1927710af982799b (diff)
downloadqarsh-38e9c4f1b856b74d72b62437b36333146ad83ee6.tar.gz
qarsh-38e9c4f1b856b74d72b62437b36333146ad83ee6.tar.xz
qarsh-38e9c4f1b856b74d72b62437b36333146ad83ee6.zip
Remove last bits of XML dependencies
Diffstat (limited to 'qarsh_packet.c')
-rw-r--r--qarsh_packet.c26
1 files changed, 8 insertions, 18 deletions
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);