Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lib ldb minor fixes #4

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Lib ldb minor fixes #4

wants to merge 9 commits into from

Commits on Nov 25, 2014

  1. lib-pyldb: Avoid SEGFAUL in case we can't convert passed valud to py-…

    …String
    
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    0fb25b0 View commit details
    Browse the repository at this point in the history
  2. lib-pyldb: Avoid leaking memory in error cases

    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    951b913 View commit details
    Browse the repository at this point in the history
  3. lib-pyldb: Throw exception when we can't create MessageElement object

    At the moment we return an error, but no exception and it is
    hard to instantly see what the problem is from Python
    
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    da1471a View commit details
    Browse the repository at this point in the history
  4. lib-ldb: Check for input parameter when searching attributes by name

    This prevents a segfault that is hard to be tracked down from
    Python bindings for instance.
    
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    94d9e44 View commit details
    Browse the repository at this point in the history
  5. lib-ldb_ldif: Stop processing if ldb_message element name is NULL

    I have hit this while using Python bindings for testing and
    forgot to pass 'name' argument to MessageElement constructor
    Passing NULL as 'name' is obviously a mistake and this commits
    aims to warn about such unintetional mistakes.
    
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    316832a View commit details
    Browse the repository at this point in the history
  6. lib-pyldb: Avoid crash when copying MessageElements between Python Me…

    …ssage objects
    
    This patch allows for following snipets in Python:
      res = ldb.search(...)
      m_from = res[0]
      m_to = Message()
      m_to.add(m_from["attrName"])
    
    The problem previously is that we are trying to reference a
    ldb_message_element that may not be a memory context on its own.
    For instance, when search request from above example returns
    Messages with more than one attribute, this leads immediately
    to "Bad talloc magic value" crash, every message element beside
    the first one is not a memory context
    
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    e9b0939 View commit details
    Browse the repository at this point in the history
  7. lib-ldb-test: Test copying message element from a message to a new me…

    …ssage
    
    Change-Id: Iefcafb418a170ee410aec900bb36eb8e01e946b1
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    bb609e0 View commit details
    Browse the repository at this point in the history
  8. lib-pyldb: Fix docstring for msg.add() method - it was "S.append()"

    Change-Id: I9492d3c3993fc3d68d7bf24405db6e8cd746eaac
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    550fa9f View commit details
    Browse the repository at this point in the history
  9. lib-pyldb: Block elements should be surrounded by {} in py_msg.setitem()

    Change-Id: I0d09374b27708fcaad3523d985a2db7983dbd81a
    Signed-off-by: Kamen Mazdrashki <[email protected]>
    kamenim committed Nov 25, 2014
    Configuration menu
    Copy the full SHA
    c5858f3 View commit details
    Browse the repository at this point in the history