~ubuntu-branches/debian/sid/rsyslog/sid

« back to all changes in this revision

Viewing changes to plugins/imptcp/imptcp.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Michael Biebl, Daniel Pocock
  • Date: 2014-03-11 19:52:49 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20140311195249-phbsh9be8lebawti
Tags: 7.4.8-1
[ Michael Biebl ]
* New upstream release.
* Update Build-Depends:
  - Bump libestr-dev to (>= 0.1.9).
  - Tighten liblognorm-dev to (<< 1.0.0).
  - Replace libjson0-dev with libjson-c-dev, we no longer need the
    transitional package.
* Bump Standards-Version to 3.9.5. No further changes.

[ Daniel Pocock ]
* Make template parameter not mandatory in mongodb output plugin. Patch
  cherry-picked from upstream Git. (Closes: #740869, #721277)
* Ensure JSON templates are NUL terminated. Patch cherry-picked from
  upstream Git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
727
727
                        DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain);
728
728
                        if(c != ' ') {
729
729
                                errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
730
 
                                            "delimiter is not SP but has ASCII value %d.\n", c);
 
730
                                            "delimiter is not SP but has ASCII value %d.", c);
731
731
                        }
732
732
                        if(pThis->iOctetsRemain < 1) {
733
733
                                /* TODO: handle the case where the octet count is 0! */
734
734
                                DBGPRINTF("Framing Error: invalid octet count\n");
735
735
                                errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
736
 
                                            "invalid octet count %d.\n", pThis->iOctetsRemain);
 
736
                                            "invalid octet count %d.", pThis->iOctetsRemain);
737
737
                        } else if(pThis->iOctetsRemain > iMaxLine) {
738
738
                                /* while we can not do anything against it, we can at least log an indication
739
739
                                 * that something went wrong) -- rgerhards, 2008-03-14
741
741
                                DBGPRINTF("truncating message with %d octets - max msg size is %d\n",
742
742
                                          pThis->iOctetsRemain, iMaxLine);
743
743
                                errmsg.LogError(0, NO_ERRCODE, "received oversize message: size is %d bytes, "
744
 
                                                "max msg size is %d, truncating...\n", pThis->iOctetsRemain, iMaxLine);
 
744
                                                "max msg size is %d, truncating...", pThis->iOctetsRemain, iMaxLine);
745
745
                        }
746
746
                        pThis->inputState = eInMsg;
747
747
                }
1288
1288
                                uchar *peerName;
1289
1289
                                int lenPeer;
1290
1290
                                prop.GetString(pSess->peerName, &peerName, &lenPeer);
1291
 
                                errmsg.LogError(0, RS_RET_PEER_CLOSED_CONN, "imptcp session %d closed by remote peer %s.\n",
 
1291
                                errmsg.LogError(0, RS_RET_PEER_CLOSED_CONN, "imptcp session %d closed by remote peer %s.",
1292
1292
                                                pSess->sock, peerName);
1293
1293
                        }
1294
1294
                        CHKiRet(closeSess(pSess));