~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to common/asshelp.c

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  gpg_error_t err;
43
43
  char *optstr;
44
44
 
 
45
  (void)errsource;
 
46
 
45
47
  if (!value || !*value)
46
48
    err = 0;  /* Avoid sending empty strings.  */
47
49
  else if (asprintf (&optstr, "OPTION %s=%s", name, value ) < 0)
49
51
  else
50
52
    {
51
53
      err = assuan_transact (ctx, optstr, NULL, NULL, NULL, NULL, NULL, NULL);
52
 
      free (optstr);
 
54
      xfree (optstr);
53
55
    }
54
56
 
55
57
  return err;
119
121
  old_lc = setlocale (LC_CTYPE, NULL);
120
122
  if (old_lc)
121
123
    {
122
 
      old_lc = strdup (old_lc);
 
124
      old_lc = xtrystrdup (old_lc);
123
125
      if (!old_lc)
124
126
        return gpg_error_from_syserror ();
125
127
    }
134
136
  if (old_lc)
135
137
    {
136
138
      setlocale (LC_CTYPE, old_lc);
137
 
      free (old_lc);
 
139
      xfree (old_lc);
138
140
    }
139
141
#endif
140
142
  if (err)
145
147
  old_lc = setlocale (LC_MESSAGES, NULL);
146
148
  if (old_lc)
147
149
    {
148
 
      old_lc = strdup (old_lc);
 
150
      old_lc = xtrystrdup (old_lc);
149
151
      if (!old_lc)
150
152
        return gpg_error_from_syserror ();
151
153
    }
160
162
  if (old_lc)
161
163
    {
162
164
      setlocale (LC_MESSAGES, old_lc);
163
 
      free (old_lc);
 
165
      xfree (old_lc);
164
166
    }
165
167
#endif
166
168
  if (err)