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

« back to all changes in this revision

Viewing changes to tcps_sess.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:
307
307
                 * generate an error message and discard the frame.
308
308
                 */
309
309
                errmsg.LogError(0, NO_ERRCODE, "Incomplete frame at end of stream in session %p - "
310
 
                            "ignoring extra data (a message may be lost).\n", pThis->pStrm);
 
310
                            "ignoring extra data (a message may be lost).", pThis->pStrm);
311
311
                /* nothing more to do */
312
312
        } else { /* here, we have traditional framing. Missing LF at the end
313
313
                 * of message may occur. As such, we process the message in
375
375
                        DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain);
376
376
                        if(c != ' ') {
377
377
                                errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
378
 
                                            "delimiter is not SP but has ASCII value %d.\n", c);
 
378
                                            "delimiter is not SP but has ASCII value %d.", c);
379
379
                        }
380
380
                        if(pThis->iOctetsRemain < 1) {
381
381
                                /* TODO: handle the case where the octet count is 0! */
382
382
                                DBGPRINTF("Framing Error: invalid octet count\n");
383
383
                                errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
384
 
                                            "invalid octet count %d.\n", pThis->iOctetsRemain);
 
384
                                            "invalid octet count %d.", pThis->iOctetsRemain);
385
385
                        } else if(pThis->iOctetsRemain > iMaxLine) {
386
386
                                /* while we can not do anything against it, we can at least log an indication
387
387
                                 * that something went wrong) -- rgerhards, 2008-03-14
389
389
                                DBGPRINTF("truncating message with %d octets - max msg size is %d\n",
390
390
                                          pThis->iOctetsRemain, iMaxLine);
391
391
                                errmsg.LogError(0, NO_ERRCODE, "received oversize message: size is %d bytes, "
392
 
                                                "max msg size is %d, truncating...\n", pThis->iOctetsRemain, iMaxLine);
 
392
                                                "max msg size is %d, truncating...", pThis->iOctetsRemain, iMaxLine);
393
393
                        }
394
394
                        pThis->inputState = eInMsg;
395
395
                }