~raghavendra-prabhu/percona-xtradb-cluster/galera-bug1153727

« back to all changes in this revision

Viewing changes to gcomm/src/gcomm/types.hpp

  • Committer: Raghavendra D Prabhu
  • Date: 2013-04-12 15:26:34 UTC
  • mfrom: (95.2.24 2.x)
  • Revision ID: raghavendra.prabhu@percona.com-20130412152634-2y2u0swshf5fie2x
Merge lp:galera-2.x upto revision 150.

Following bugs are fixed:

lp:1166065
lp:1164992

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    class String
23
23
    {
24
24
    public:
 
25
 
25
26
        String(const std::string& str = "") : str_(str)
26
27
        {
27
28
            if (str_.size() > str_size_)
28
29
            {
29
30
                gu_throw_error(EMSGSIZE);
30
31
            }
31
 
 
32
32
        }
33
33
 
34
34
        virtual ~String() { }
35
35
 
36
 
        size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset)
37
 
            const throw(gu::Exception)
 
36
        size_t serialize(gu::byte_t* buf, size_t buflen, size_t offset) const
38
37
        {
39
38
            if (buflen < offset + str_size_)
40
39
            {
49
48
        }
50
49
 
51
50
        size_t unserialize(const gu::byte_t* buf, size_t buflen, size_t offset)
52
 
            throw(gu::Exception)
53
51
        {
54
52
            if (buflen < offset + str_size_)
55
53
            {