summaryrefslogtreecommitdiffstats
path: root/omusrmsg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
commit6e2c5057684a191c565220e6e41e561305b3a6ba (patch)
tree59ebc9ca6e9952db513c9f65bc39a2a4c5ff239e /omusrmsg.c
parent54669873b0469aa69a4c9f88bcf88470218082f8 (diff)
downloadrsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.gz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.xz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.zip
- changed doAction() interface to contain the full message string
- f_iov and its handling has been removed
Diffstat (limited to 'omusrmsg.c')
-rw-r--r--omusrmsg.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/omusrmsg.c b/omusrmsg.c
index b031bb68..3c47fb8d 100644
--- a/omusrmsg.c
+++ b/omusrmsg.c
@@ -147,7 +147,7 @@ void endutent(void)
* Adjust the size of a variable to prevent a buffer overflow
* should _PATH_DEV ever contain something different than "/dev/".
*/
-static void wallmsg(selector_t *f, instanceData *pData)
+static void wallmsg(selector_t *f, uchar* pMsg, instanceData *pData)
{
char p[sizeof(_PATH_DEV) + UNAMESZ];
@@ -158,12 +158,11 @@ static void wallmsg(selector_t *f, instanceData *pData)
struct utmp *uptr;
assert(f != NULL);
+ assert(pMsg != NULL);
if (reenter++)
return;
- iovCreate(f); /* init the iovec */
-
/* open the user login file */
setutent();
@@ -228,7 +227,7 @@ static void wallmsg(selector_t *f, instanceData *pData)
if (fstat(ttyf, &statb) == 0 &&
(statb.st_mode & S_IWRITE)) {
- (void) writev(ttyf, f->f_iov, f->f_iIovUsed);
+ (void) write(ttyf, pMsg, strlen((char*)pMsg));
}
close(ttyf);
ttyf = -1;
@@ -248,7 +247,7 @@ BEGINdoAction
CODESTARTdoAction
dprintf("\n");
/* TODO: change wallmsg so that it returns iRet */
- wallmsg(f, pData);
+ wallmsg(f, pMsg, pData);
ENDdoAction