~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-updates

« back to all changes in this revision

Viewing changes to tcpsrv.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-06-23 12:12:43 UTC
  • mfrom: (1.1.11 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090623121243-d2fejarzidywnn17
Tags: 4.2.0-1
* New upstream release of the now stable v4 branch.
  - Fix warnings when /etc/rsyslog.d/ is empty. Closes: #530228
* debian/patches/imudp_multiple_udp_sockets.patch
  - Removed, merged upstream.
* debian/rsyslog.default
  - Set default compat mode to '4'.
* debian/rsyslog.logcheck.ignore.server
  - Update logcheck rules files to also ignore rsyslogd and imklog stop
    messages.
* debian/control
  - Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
/* Standard-Constructor */
514
514
BEGINobjConstruct(tcpsrv) /* be sure to specify the object type also in END macro! */
515
515
        pThis->iSessMax = TCPSESS_MAX_DEFAULT; /* TODO: useful default ;) */
 
516
        pThis->addtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER;
516
517
ENDobjConstruct(tcpsrv)
517
518
 
518
519
 
560
561
                free(pThis->pszDrvrAuthMode);
561
562
        if(pThis->ppLstn != NULL)
562
563
                free(pThis->ppLstn);
 
564
        if(pThis->pszInputName != NULL)
 
565
                free(pThis->pszInputName);
563
566
ENDobjDestruct(tcpsrv)
564
567
 
565
568
 
658
661
}
659
662
 
660
663
 
 
664
/* Set additional framing to use (if any) -- rgerhards, 2008-12-10 */
 
665
static rsRetVal
 
666
SetAddtlFrameDelim(tcpsrv_t *pThis, int iDelim)
 
667
{
 
668
        DEFiRet;
 
669
        ISOBJ_TYPE_assert(pThis, tcpsrv);
 
670
        pThis->addtlFrameDelim = iDelim;
 
671
        RETiRet;
 
672
}
 
673
 
 
674
 
 
675
/* Set the input name to use -- rgerhards, 2008-12-10 */
 
676
static rsRetVal
 
677
SetInputName(tcpsrv_t *pThis, uchar *name)
 
678
{
 
679
        uchar *pszName;
 
680
        DEFiRet;
 
681
        ISOBJ_TYPE_assert(pThis, tcpsrv);
 
682
        if(name == NULL)
 
683
                pszName = NULL;
 
684
        else
 
685
                CHKmalloc(pszName = (uchar*)strdup((char*)name));
 
686
        if(pThis->pszInputName != NULL)
 
687
                free(pThis->pszInputName);
 
688
        pThis->pszInputName = pszName;
 
689
finalize_it:
 
690
        RETiRet;
 
691
}
 
692
 
 
693
 
661
694
/* here follows a number of methods that shuffle authentication settings down
662
695
 * to the drivers. Drivers not supporting these settings may return an error
663
696
 * state.
741
774
        pIf->Run = Run;
742
775
 
743
776
        pIf->SetUsrP = SetUsrP;
 
777
        pIf->SetInputName = SetInputName;
 
778
        pIf->SetAddtlFrameDelim = SetAddtlFrameDelim;
744
779
        pIf->SetSessMax = SetSessMax;
745
780
        pIf->SetDrvrMode = SetDrvrMode;
746
781
        pIf->SetDrvrAuthMode = SetDrvrAuthMode;