~ubuntu-branches/ubuntu/trusty/rsyslog/trusty

« back to all changes in this revision

Viewing changes to tcpsrv.c

  • Committer: Dave Walker (Daviey)
  • Author(s): Scott Moser
  • Date: 2011-06-17 20:59:38 UTC
  • mfrom: (36.1.8 oneiric.merge)
  • Revision ID: davewalker@ubuntu.com-20110617205938-pfkizxz2wsgzi2ot
Tags: 5.8.1-1ubuntu1
* Resynchronise with Debian (LP: #794230).  Remaining changes:
  - Run as rsyslog:rsyslog, set $FileOwner to syslog
  - Replace init script with debian/rsyslog.upstart.
  - debian/rsyslog.logrotate: Use reload command to restart rsyslog
  - debian/rsyslog.conf: enable $RepeatedMsgReduction 
    to avoid bloating the syslog file (LP #453444)
  - Add debian/rsyslog.dmesg.upstart to save initial dmesg into a file.
    Install it in debian/rules.
  - debian/50-default.conf: set of default rules for syslog (forwarded to
    Debian #603160). remove file in postrm on purge. manage with ucf.
  - debian/rules: build with LDFLAGS=""
* Dropped:
  - debian/control: Bump build-dependency on debhelper
    debian now depends on dh >= 8
* New upstream release.
* Bump Standards-Version to 3.9.2. No further changes.
* Enable and install impstats module. (Closes: #620114)
* Update logcheck rule. (Closes: #616659)
* debian/rsyslog.init: Set correct compat level (5).
* The way rsyslog processes SIGHUP has changed. It no longer does a reload
  of its configuration, but simply closes all open files. To apply a changed
  configuration, rsyslogd needs to be restarted now.
  - Drop "reload" action from debian/rsyslog.init, map "force-reload" to
    "restart". (Closes: #580897)
  - Add "rotate" action to debian/rsyslog.init which sends SIGHUP to
    rsyslogd. Use that in debian/rsyslog.logrotate. (Closes: #626365)
  - Update debian/rsyslog-mysql.postinst and rsyslog-pgsql.postinst to use
    restart instead of reload.
  - Add a NEWS file explaining the changed SIGHUP handling.
* New upstream stable release.
* New upstream release.
  - Properly handle ANSI SQL strings in ompgsql. (Closes: #600479)
* New upstream release.
* debian/patches/02-pmaixforwardedfrom_type_nokeep.patch
  - Remove, merged upstream.
* debian/patches/03-epoll_create1-fallback.patch
  - Remove, merged upstream.
* debian/patches/03-epoll_create1-fallback.patch
  - If epoll_create1() is not available during runtime, fall back to
    epoll_create(). This fixes remote syslog when runnig rsyslog on a
    lenny kernel. (Closes: #617996)
* New upstream release.
* debian/rsyslog.links
  - Create symlink for rsyslog.service in multi-user.target.wants so rsyslog
    is enabled by default when using systemd.
* debian/patches/02-pmaixforwardedfrom_type_nokeep.patch
  - Fix build failure in aixforwardedfrom parser module by setting the
    module type to NOKEEP.
* debian/rsyslog.preinst
  - Remove old rsyslog.socket symlink from sockets.target.wants on upgrades
    as rsyslog uses syslog.socket now which is provided by systemd.
* debian/rsyslog.install
  - Stop installing rsyslog.socket.
* New upstream release.
* New upstream release.
  - Fix regression in imuxsock plugin which did no longer sanitize received
    messages. This makes 02-cleanup-trailing-lf.patch obsolete and also
    fixes the SQL syntax errors in the mysql output if the input contained
    NUL bytes. Closes: #614061
* Enable and install omprog output plugin. Closes: #552095
* Improve package description. Closes: #612948
  Thanks to Justin B Rye for the patch.
* debian/patches/02-cleanup-trailing-lf.patch
  - Fix regression in imuxsock plugin which did not remove a trailing LF
    anymore. Patch cherry-picked from upstream Git. Closes: #612829
* New upstream release.
* Enable and install parser modules.
* New upstream release.
* Upload to unstable.
* debian/patches/02-typo_fix_equation_sign.patch
  - Removed, merged upstream.
* debian/patches/03-atomic_operations.patch
  - Removed, merged upstream.
* debian/patches/03-atomic_operations.patch
  - Fix build failures on platforms which don't have 64 bit atomic
    operations. Patch cherry-picked from upstream Git. Closes: #600930
* New upstream development release.
* Remove patches, merged upstream
  - debian/patches/02-install_also_rsyslog_socket.patch
  - debian/patches/02-tls_loop_fix.patch
* debian/patches/02-typo_fix_equation_sign.patch
  - Fix small typo ("equation sign"). Closes: #575589
* debian/rsyslog.postinst
  - Remove pre-lenny migration code to rotate old log files from sysklogd.
* New upstream development release.
* debian/rsyslog.install
  - Install omruleset.so plugin: http://www.rsyslog.com/doc/omruleset.html
* debian/rsyslog.default
  - Start rsyslogd with native -c5 mode.
* Install systemd unit files which allow to run rsyslog in socket activation
  mode when systemd is used.
* debian/patches/02-install_also_rsyslog_socket.patch
  - When enabling rsyslog.service also enable rsyslog.socket. Patch
    cherry-picked from upstream Git.
* Bump debhelper compatibility level to 8. Update Build-Depends accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 * callbacks before the code is run. The tcpsrv then calls back
16
16
 * into the specific input modules at the appropriate time.
17
17
 *
18
 
 * NOTE: read comments in module-template.h to understand how this file
19
 
 *       works!
20
 
 *
21
18
 * File begun on 2007-12-21 by RGerhards (extracted from syslogd.c)
22
19
 *
23
 
 * Copyright 2007, 2008, 2009 Rainer Gerhards and Adiscon GmbH.
 
20
 * Copyright 2007-2010 Rainer Gerhards and Adiscon GmbH.
24
21
 *
25
22
 * This file is part of rsyslog.
26
23
 *
68
65
#include "netstrms.h"
69
66
#include "netstrm.h"
70
67
#include "nssel.h"
 
68
#include "nspoll.h"
71
69
#include "errmsg.h"
72
70
#include "ruleset.h"
73
71
#include "unicode-helper.h"
74
72
 
75
73
MODULE_TYPE_LIB
 
74
MODULE_TYPE_NOKEEP
76
75
 
77
76
/* defines */
78
77
#define TCPSESS_MAX_DEFAULT 200 /* default for nbr of tcp sessions if no number is given */
89
88
DEFobjCurrIf(netstrms)
90
89
DEFobjCurrIf(netstrm)
91
90
DEFobjCurrIf(nssel)
 
91
DEFobjCurrIf(nspoll)
92
92
DEFobjCurrIf(prop)
93
93
 
94
94
 
104
104
        ISOBJ_TYPE_assert(pThis, tcpsrv);
105
105
 
106
106
        /* create entry */
107
 
        CHKmalloc(pEntry = malloc(sizeof(tcpLstnPortList_t)));
 
107
        CHKmalloc(pEntry = MALLOC(sizeof(tcpLstnPortList_t)));
108
108
        pEntry->pszPort = pszPort;
109
109
        pEntry->pSrv = pThis;
110
110
        pEntry->pRuleset = pThis->pRuleset;
165
165
        ISOBJ_TYPE_assert(pThis, tcpsrv);
166
166
        assert(pThis->pSessions == NULL);
167
167
 
168
 
        dbgprintf("Allocating buffer for %d TCP sessions.\n", pThis->iSessMax);
 
168
        DBGPRINTF("Allocating buffer for %d TCP sessions.\n", pThis->iSessMax);
169
169
        if((pThis->pSessions = (tcps_sess_t **) calloc(pThis->iSessMax, sizeof(tcps_sess_t *))) == NULL) {
170
 
                dbgprintf("Error: TCPSessInit() could not alloc memory for TCP session table.\n");
 
170
                DBGPRINTF("Error: TCPSessInit() could not alloc memory for TCP session table.\n");
171
171
                ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
172
172
        }
173
173
 
238
238
 
239
239
        if(pThis->pSessions != NULL) {
240
240
                /* close all TCP connections! */
241
 
                i = TCPSessGetNxtSess(pThis, -1);
242
 
                while(i != -1) {
243
 
                        tcps_sess.Destruct(&pThis->pSessions[i]);
244
 
                        /* now get next... */
245
 
                        i = TCPSessGetNxtSess(pThis, i);
 
241
                if(!pThis->bUsingEPoll) {
 
242
                        i = TCPSessGetNxtSess(pThis, -1);
 
243
                        while(i != -1) {
 
244
                                tcps_sess.Destruct(&pThis->pSessions[i]);
 
245
                                /* now get next... */
 
246
                                i = TCPSessGetNxtSess(pThis, i);
 
247
                        }
246
248
                }
247
249
                
248
250
                /* we are done with the session table - so get rid of it...  */
412
414
         * rgerhards, 2005-09-26
413
415
         */
414
416
        if(!pThis->pIsPermittedHost((struct sockaddr*) addr, (char*) fromHostFQDN, pThis->pUsr, pSess->pUsr)) {
415
 
                dbgprintf("%s is not an allowed sender\n", fromHostFQDN);
 
417
                DBGPRINTF("%s is not an allowed sender\n", fromHostFQDN);
416
418
                if(glbl.GetOption_DisallowWarning()) {
417
419
                        errno = 0;
418
420
                        errmsg.LogError(0, RS_RET_HOST_NOT_PERMITTED, "TCP message from disallowed sender %s discarded", fromHostFQDN);
438
440
        }
439
441
 
440
442
        *ppSess = pSess;
441
 
        pThis->pSessions[iSess] = pSess;
 
443
        if(!pThis->bUsingEPoll)
 
444
                pThis->pSessions[iSess] = pSess;
442
445
        pSess = NULL; /* this is now also handed over */
443
446
 
444
447
finalize_it:
465
468
}
466
469
 
467
470
 
468
 
/* This function is called to gather input. */
 
471
/* helper to close a session. Takes status of poll vs. select into consideration.
 
472
 * rgerhards, 2009-11-25
 
473
 */
 
474
static inline rsRetVal
 
475
closeSess(tcpsrv_t *pThis, tcps_sess_t **ppSess, nspoll_t *pPoll) {
 
476
        DEFiRet;
 
477
        if(pPoll != NULL) {
 
478
                CHKiRet(nspoll.Ctl(pPoll, (*ppSess)->pStrm, 0, *ppSess, NSDPOLL_IN, NSDPOLL_DEL));
 
479
        }
 
480
        pThis->pOnRegularClose(*ppSess);
 
481
        tcps_sess.Destruct(ppSess);
 
482
finalize_it:
 
483
        RETiRet;
 
484
}
 
485
 
 
486
 
 
487
/* process a receive request on one of the streams
 
488
 * If pPoll is non-NULL, we have a netstream in epoll mode, which means we need
 
489
 * to remove any descriptor we close from the epoll set.
 
490
 * rgerhards, 2009-07-020
 
491
 */
 
492
static rsRetVal
 
493
doReceive(tcpsrv_t *pThis, tcps_sess_t **ppSess, nspoll_t *pPoll)
 
494
{
 
495
        char buf[128*1024]; /* reception buffer - may hold a partial or multiple messages */
 
496
        ssize_t iRcvd;
 
497
        rsRetVal localRet;
 
498
        DEFiRet;
 
499
 
 
500
        ISOBJ_TYPE_assert(pThis, tcpsrv);
 
501
        DBGPRINTF("netstream %p with new data\n", (*ppSess)->pStrm);
 
502
        /* Receive message */
 
503
        iRet = pThis->pRcvData(*ppSess, buf, sizeof(buf), &iRcvd);
 
504
        switch(iRet) {
 
505
        case RS_RET_CLOSED:
 
506
                if(pThis->bEmitMsgOnClose) {
 
507
                        uchar *pszPeer;
 
508
                        int lenPeer;
 
509
                        errno = 0;
 
510
                        prop.GetString((*ppSess)->fromHostIP, &pszPeer, &lenPeer);
 
511
                        errmsg.LogError(0, RS_RET_PEER_CLOSED_CONN, "Netstream session %p closed by remote peer %s.\n",
 
512
                                        (*ppSess)->pStrm, pszPeer);
 
513
                }
 
514
                CHKiRet(closeSess(pThis, ppSess, pPoll));
 
515
                break;
 
516
        case RS_RET_RETRY:
 
517
                /* we simply ignore retry - this is not an error, but we also have not received anything */
 
518
                break;
 
519
        case RS_RET_OK:
 
520
                /* valid data received, process it! */
 
521
                localRet = tcps_sess.DataRcvd(*ppSess, buf, iRcvd);
 
522
                if(localRet != RS_RET_OK && localRet != RS_RET_QUEUE_FULL) {
 
523
                        /* in this case, something went awfully wrong.
 
524
                         * We are instructed to terminate the session.
 
525
                         */
 
526
                        errmsg.LogError(0, localRet, "Tearing down TCP Session - see "
 
527
                                            "previous messages for reason(s)\n");
 
528
                        CHKiRet(closeSess(pThis, ppSess, pPoll));
 
529
                }
 
530
                break;
 
531
        default:
 
532
                errno = 0;
 
533
                errmsg.LogError(0, iRet, "netstream session %p will be closed due to error\n",
 
534
                                (*ppSess)->pStrm);
 
535
                CHKiRet(closeSess(pThis, ppSess, pPoll));
 
536
                break;
 
537
        }
 
538
 
 
539
finalize_it:
 
540
        RETiRet;
 
541
}
 
542
 
 
543
 
 
544
/* This function is called to gather input.
 
545
 * This variant here is only used if we need to work with a netstream driver
 
546
 * that does not support epoll().
 
547
 */
469
548
#pragma GCC diagnostic ignored "-Wempty-body"
470
 
static rsRetVal
471
 
Run(tcpsrv_t *pThis)
 
549
static inline rsRetVal
 
550
RunSelect(tcpsrv_t *pThis)
472
551
{
473
552
        DEFiRet;
474
553
        int nfds;
476
555
        int iTCPSess;
477
556
        int bIsReady;
478
557
        tcps_sess_t *pNewSess;
479
 
        nssel_t *pSel;
480
 
        ssize_t iRcvd;
 
558
        nssel_t *pSel = NULL;
481
559
 
482
560
        ISOBJ_TYPE_assert(pThis, tcpsrv);
483
561
 
484
562
        /* this is an endless loop - it is terminated by the framework canelling
485
563
         * this thread. Thus, we also need to instantiate a cancel cleanup handler
486
 
         * to prevent us from leaking anything. -- rgerharsd, 20080-04-24
 
564
         * to prevent us from leaking anything. -- rgerhards, 20080-04-24
487
565
         */
488
566
        pthread_cleanup_push(RunCancelCleanup, (void*) &pSel);
489
567
        while(1) {
507
585
 
508
586
                /* wait for io to become ready */
509
587
                CHKiRet(nssel.Wait(pSel, &nfds));
 
588
                if(glbl.GetGlobalInputTermState() == 1)
 
589
                        break; /* terminate input! */
510
590
 
511
591
                for(i = 0 ; i < pThis->iLstnCurr ; ++i) {
 
592
                        if(glbl.GetGlobalInputTermState() == 1)
 
593
                                ABORT_FINALIZE(RS_RET_FORCE_TERM);
512
594
                        CHKiRet(nssel.IsReady(pSel, pThis->ppLstn[i], NSDSEL_RD, &bIsReady, &nfds));
513
595
                        if(bIsReady) {
514
 
                                dbgprintf("New connect on NSD %p.\n", pThis->ppLstn[i]);
 
596
                                DBGPRINTF("New connect on NSD %p.\n", pThis->ppLstn[i]);
515
597
                                SessAccept(pThis, pThis->ppLstnPort[i], &pNewSess, pThis->ppLstn[i]);
516
598
                                --nfds; /* indicate we have processed one */
517
599
                        }
520
602
                /* now check the sessions */
521
603
                iTCPSess = TCPSessGetNxtSess(pThis, -1);
522
604
                while(nfds && iTCPSess != -1) {
 
605
                        if(glbl.GetGlobalInputTermState() == 1)
 
606
                                ABORT_FINALIZE(RS_RET_FORCE_TERM);
523
607
                        CHKiRet(nssel.IsReady(pSel, pThis->pSessions[iTCPSess]->pStrm, NSDSEL_RD, &bIsReady, &nfds));
524
608
                        if(bIsReady) {
525
 
                                char buf[128*1024]; /* reception buffer - may hold a partial or multiple messages */
526
 
                                dbgprintf("netstream %p with new data\n", pThis->pSessions[iTCPSess]->pStrm);
527
 
 
528
 
                                /* Receive message */
529
 
                                iRet = pThis->pRcvData(pThis->pSessions[iTCPSess], buf, sizeof(buf), &iRcvd);
530
 
                                switch(iRet) {
531
 
                                case RS_RET_CLOSED:
532
 
                                        if(pThis->bEmitMsgOnClose) {
533
 
                                                uchar *pszPeer;
534
 
                                                int lenPeer;
535
 
                                                errno = 0;
536
 
                                                prop.GetString(pThis->pSessions[iTCPSess]->fromHostIP, &pszPeer, &lenPeer);
537
 
                                                errmsg.LogError(0, RS_RET_PEER_CLOSED_CONN, "Netstream session %p closed by remote peer %s.\n",
538
 
                                                                pThis->pSessions[iTCPSess]->pStrm, pszPeer);
539
 
                                        }
540
 
                                        pThis->pOnRegularClose(pThis->pSessions[iTCPSess]);
541
 
                                        tcps_sess.Destruct(&pThis->pSessions[iTCPSess]);
542
 
                                        break;
543
 
                                case RS_RET_RETRY:
544
 
                                        /* we simply ignore retry - this is not an error, but we also have not received anything */
545
 
                                        break;
546
 
                                case RS_RET_OK:
547
 
                                        /* valid data received, process it! */
548
 
                                        if(tcps_sess.DataRcvd(pThis->pSessions[iTCPSess], buf, iRcvd) != RS_RET_OK) {
549
 
                                                /* in this case, something went awfully wrong.
550
 
                                                 * We are instructed to terminate the session.
551
 
                                                 */
552
 
                                                errmsg.LogError(0, NO_ERRCODE, "Tearing down TCP Session %d - see "
553
 
                                                            "previous messages for reason(s)\n", iTCPSess);
554
 
                                                pThis->pOnErrClose(pThis->pSessions[iTCPSess]);
555
 
                                                tcps_sess.Destruct(&pThis->pSessions[iTCPSess]);
556
 
                                        }
557
 
                                        break;
558
 
                                default:
559
 
                                        errno = 0;
560
 
                                        errmsg.LogError(0, iRet, "netstream session %p will be closed due to error\n",
561
 
                                                        pThis->pSessions[iTCPSess]->pStrm);
562
 
                                        pThis->pOnErrClose(pThis->pSessions[iTCPSess]);
563
 
                                        tcps_sess.Destruct(&pThis->pSessions[iTCPSess]);
564
 
                                        break;
565
 
                                }
 
609
                                doReceive(pThis, &pThis->pSessions[iTCPSess], NULL);
566
610
                                --nfds; /* indicate we have processed one */
567
611
                        }
568
612
                        iTCPSess = TCPSessGetNxtSess(pThis, iTCPSess);
578
622
        }
579
623
 
580
624
        /* note that this point is usually not reached */
581
 
        pthread_cleanup_pop(0); /* remove cleanup handler */
 
625
        pthread_cleanup_pop(1); /* remove cleanup handler */
582
626
 
583
627
        RETiRet;
584
628
}
585
629
#pragma GCC diagnostic warning "-Wempty-body"
586
630
 
587
631
 
 
632
/* This function is called to gather input. It tries doing that via the epoll()
 
633
 * interface. If the driver does not support that, it falls back to calling its
 
634
 * select() equivalent.
 
635
 * rgerhards, 2009-11-18
 
636
 */
 
637
static rsRetVal
 
638
Run(tcpsrv_t *pThis)
 
639
{
 
640
        DEFiRet;
 
641
        int i;
 
642
        tcps_sess_t *pNewSess;
 
643
        nspoll_t *pPoll = NULL;
 
644
        void *pUsr;
 
645
        rsRetVal localRet;
 
646
 
 
647
        ISOBJ_TYPE_assert(pThis, tcpsrv);
 
648
 
 
649
        /* this is an endless loop - it is terminated by the framework canelling
 
650
         * this thread. Thus, we also need to instantiate a cancel cleanup handler
 
651
         * to prevent us from leaking anything. -- rgerhards, 20080-04-24
 
652
         */
 
653
        if((localRet = nspoll.Construct(&pPoll)) == RS_RET_OK) {
 
654
                // TODO: set driver
 
655
                localRet = nspoll.ConstructFinalize(pPoll);
 
656
        }
 
657
        if(localRet != RS_RET_OK) {
 
658
                /* fall back to select */
 
659
                dbgprintf("tcpsrv could not use epoll() interface, iRet=%d, using select()\n", localRet);
 
660
                iRet = RunSelect(pThis);
 
661
                FINALIZE;
 
662
        }
 
663
 
 
664
        dbgprintf("tcpsrv uses epoll() interface, nsdpol driver found\n");
 
665
 
 
666
        /* flag that we are in epoll mode */
 
667
        pThis->bUsingEPoll = TRUE;
 
668
 
 
669
        /* Add the TCP listen sockets to the list of sockets to monitor */
 
670
        for(i = 0 ; i < pThis->iLstnCurr ; ++i) {
 
671
                dbgprintf("Trying to add listener %d, pUsr=%p\n", i, pThis->ppLstn);
 
672
                CHKiRet(nspoll.Ctl(pPoll, pThis->ppLstn[i], i, pThis->ppLstn, NSDPOLL_IN, NSDPOLL_ADD));
 
673
                dbgprintf("Added listener %d\n", i);
 
674
        }
 
675
 
 
676
        while(1) {
 
677
                localRet = nspoll.Wait(pPoll, -1, &i, &pUsr);
 
678
                if(glbl.GetGlobalInputTermState() == 1)
 
679
                        break; /* terminate input! */
 
680
 
 
681
                /* check if we need to ignore the i/o ready state. We do this if we got an invalid
 
682
                 * return state. Validly, this can happen for RS_RET_EINTR, for other cases it may
 
683
                 * not be the right thing, but what is the right thing is really hard at this point...
 
684
                 */
 
685
                if(localRet != RS_RET_OK)
 
686
                        continue;
 
687
 
 
688
                dbgprintf("poll returned with i %d, pUsr %p\n", i, pUsr);
 
689
 
 
690
                if(pUsr == pThis->ppLstn) {
 
691
                        DBGPRINTF("New connect on NSD %p.\n", pThis->ppLstn[i]);
 
692
                        SessAccept(pThis, pThis->ppLstnPort[i], &pNewSess, pThis->ppLstn[i]);
 
693
                        CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0, pNewSess, NSDPOLL_IN, NSDPOLL_ADD));
 
694
                        DBGPRINTF("New session created with NSD %p.\n", pNewSess);
 
695
                } else {
 
696
                        pNewSess = (tcps_sess_t*) pUsr;
 
697
                        doReceive(pThis, &pNewSess, pPoll);
 
698
                }
 
699
        }
 
700
 
 
701
        /* remove the tcp listen sockets from the epoll set */
 
702
        for(i = 0 ; i < pThis->iLstnCurr ; ++i) {
 
703
                CHKiRet(nspoll.Ctl(pPoll, pThis->ppLstn[i], i, pThis->ppLstn, NSDPOLL_IN, NSDPOLL_DEL));
 
704
        }
 
705
 
 
706
finalize_it:
 
707
        if(pPoll != NULL)
 
708
                nspoll.Destruct(&pPoll);
 
709
        RETiRet;
 
710
}
 
711
 
 
712
 
588
713
/* Standard-Constructor */
589
714
BEGINobjConstruct(tcpsrv) /* be sure to specify the object type also in END macro! */
590
715
        pThis->iSessMax = TCPSESS_MAX_DEFAULT;
591
716
        pThis->iLstnMax = TCPLSTN_MAX_DEFAULT;
592
717
        pThis->addtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER;
 
718
        pThis->bDisableLFDelim = 0;
593
719
        pThis->OnMsgReceive = NULL;
594
720
ENDobjConstruct(tcpsrv)
595
721
 
746
872
}
747
873
 
748
874
 
 
875
/* set enable/disable standard LF frame delimiter (use with care!)
 
876
 * -- rgerhards, 2010-01-03
 
877
 */
 
878
static rsRetVal
 
879
SetbDisableLFDelim(tcpsrv_t *pThis, int bVal)
 
880
{
 
881
        DEFiRet;
 
882
        ISOBJ_TYPE_assert(pThis, tcpsrv);
 
883
        pThis->bDisableLFDelim = bVal;
 
884
        RETiRet;
 
885
}
 
886
 
749
887
 
750
888
/* Set additional framing to use (if any) -- rgerhards, 2008-12-10 */
751
889
static rsRetVal
887
1025
        pIf->ConstructFinalize = tcpsrvConstructFinalize;
888
1026
        pIf->Destruct = tcpsrvDestruct;
889
1027
 
890
 
        //pIf->SessAccept = SessAccept;
891
1028
        pIf->configureTCPListen = configureTCPListen;
892
1029
        pIf->create_tcp_socket = create_tcp_socket;
893
1030
        pIf->Run = Run;
895
1032
        pIf->SetUsrP = SetUsrP;
896
1033
        pIf->SetInputName = SetInputName;
897
1034
        pIf->SetAddtlFrameDelim = SetAddtlFrameDelim;
 
1035
        pIf->SetbDisableLFDelim = SetbDisableLFDelim;
898
1036
        pIf->SetSessMax = SetSessMax;
899
1037
        pIf->SetLstnMax = SetLstnMax;
900
1038
        pIf->SetDrvrMode = SetDrvrMode;
948
1086
        CHKiRet(objUse(netstrms, LM_NETSTRMS_FILENAME));
949
1087
        CHKiRet(objUse(netstrm, DONT_LOAD_LIB));
950
1088
        CHKiRet(objUse(nssel, DONT_LOAD_LIB));
 
1089
        CHKiRet(objUse(nspoll, DONT_LOAD_LIB));
951
1090
        CHKiRet(objUse(tcps_sess, DONT_LOAD_LIB));
952
1091
        CHKiRet(objUse(conf, CORE_COMPONENT));
953
1092
        CHKiRet(objUse(glbl, CORE_COMPONENT));