~ubuntu-branches/ubuntu/wily/openldap/wily-proposed

« back to all changes in this revision

Viewing changes to libraries/librewrite/var.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-02-24 14:27:35 UTC
  • mfrom: (1.1.3 upstream)
  • mto: (0.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090224142735-e73y1g4r2pj6wdbf
Tags: 2.4.15-1
* New upstream version
  - Fixes a bug with the pcache overlay not returning cached entries
    (closes: #497697)
  - Update evolution-ntlm patch to apply to current Makefiles.
  - (tentatively) drop gnutls-ciphers, since this bug was reported to be
    fixed upstream in 2.4.8.  The fix applied in 2.4.8 didn't match the
    patch from the bug report, so this should be watched for regressions.
* Build against db4.7 instead of db4.2 at last!  Closes: #421946.
* Build with --disable-ndb, to avoid a misbuild when libmysqlclient is
  installed in the build environment.
* Add -D_GNU_SOURCE to CFLAGS, apparently required for building with
  current headers in unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenLDAP: pkg/ldap/libraries/librewrite/var.c,v 1.13.2.3 2008/02/11 23:26:43 kurt Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/libraries/librewrite/var.c,v 1.13.2.5 2009/01/22 00:00:59 kurt Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
 
 * Copyright 2000-2008 The OpenLDAP Foundation.
 
4
 * Copyright 2000-2009 The OpenLDAP Foundation.
5
5
 * All rights reserved.
6
6
 *
7
7
 * Redistribution and use in source and binary forms, with or without
123
123
                int flags
124
124
)
125
125
{
126
 
        ber_len_t       len = strlen( value );
 
126
        ber_len_t       len;
 
127
 
 
128
        assert( value != NULL );
 
129
 
 
130
        len = strlen( value );
127
131
 
128
132
        if ( var->lv_flags & REWRITE_VAR_COPY_VALUE ) {
129
133
                if ( flags & REWRITE_VAR_COPY_VALUE ) {
151
155
                }
152
156
        }
153
157
 
 
158
        if ( var->lv_value.bv_val == NULL ) {
 
159
                return -1;
 
160
        }
 
161
 
154
162
        var->lv_value.bv_len = len;
155
163
 
156
164
        return 0;