summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-09-27 12:25:11 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-09-27 12:25:11 +0000
commit4095554465fb330ae35a66d2fd108a83afecbee8 (patch)
tree98f26f394a4c33f36db169278eaeeda0591a152d /parse.c
parent21cbbd071a3696695490dc94b11238ae6038ff63 (diff)
downloadrsyslog-4095554465fb330ae35a66d2fd108a83afecbee8.tar.gz
rsyslog-4095554465fb330ae35a66d2fd108a83afecbee8.tar.xz
rsyslog-4095554465fb330ae35a66d2fd108a83afecbee8.zip
added allowedSender support for TCP
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index a2eb9ce3..4631be84 100644
--- a/parse.c
+++ b/parse.c
@@ -453,6 +453,20 @@ int rsParsGetParsePointer(rsParsObj *pThis)
return rsCStrLen(pThis->pCStr) - 1;
}
+/* peek at the character at the parse pointer
+ * the caller must ensure that the parse pointer is not
+ * at the end of the parse buffer (e.g. by first calling
+ * parsIsAtEndOfParseString).
+ * rgerhards, 2005-09-27
+ */
+char parsPeekAtCharAtParsPtr(rsParsObj *pThis)
+{
+ rsCHECKVALIDOBJECT(pThis, OIDrsPars);
+ assert(pThis->iCurrPos < rsCStrLen(pThis->pCStr));
+
+ return(*(pThis->pCStr->pBuf + pThis->iCurrPos));
+}
+
/*
* Local variables: