~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/bind/irs/irs_data.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 */
17
17
 
18
18
#if !defined(LINT) && !defined(CODECENTER)
19
 
static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.2.4.3 2004/11/30 01:15:43 marka Exp $";
 
19
static const char rcsid[] = "$Id: irs_data.c,v 1.12 2007/08/27 03:32:26 marka Exp $";
20
20
#endif
21
21
 
22
22
#include "port_before.h"
113
113
        memput(net_data, sizeof *net_data);
114
114
}
115
115
 
116
 
/* applications that need a specific config file other than
 
116
/*%
 
117
 *  applications that need a specific config file other than
117
118
 * _PATH_IRS_CONF should call net_data_init directly rather than letting
118
119
 *   the various wrapper functions make the first call. - brister
119
120
 */
128
129
        struct net_data *net_data;
129
130
 
130
131
        if (!once) {
131
 
                pthread_mutex_lock(&keylock);
132
 
                if (!once++)
133
 
                        pthread_key_create(&key, net_data_destroy);
134
 
                pthread_mutex_unlock(&keylock);
 
132
                if (pthread_mutex_lock(&keylock) != 0)
 
133
                        return (NULL);
 
134
                if (!once) {
 
135
                        if (pthread_key_create(&key, net_data_destroy) != 0) {
 
136
                                (void)pthread_mutex_unlock(&keylock);
 
137
                                return (NULL);
 
138
                        }
 
139
                        once = 1;
 
140
                }
 
141
                if (pthread_mutex_unlock(&keylock) != 0)
 
142
                        return (NULL);
135
143
        }
136
144
        net_data = pthread_getspecific(key);
137
145
#endif
141
149
                if (net_data == NULL)
142
150
                        return (NULL);
143
151
#ifdef  DO_PTHREADS
144
 
                pthread_setspecific(key, net_data);
 
152
                if (pthread_setspecific(key, net_data) != 0) {
 
153
                        net_data_destroy(net_data);
 
154
                        return (NULL);
 
155
                }
145
156
#endif
146
157
        }
147
158
 
231
242
}
232
243
 
233
244
#endif /*__BIND_NOSTATIC*/
 
245
 
 
246
/*! \file */