~ubuntu-branches/ubuntu/oneiric/libao/oneiric

« back to all changes in this revision

Viewing changes to src/plugins/nas/ao_nas.c

  • Committer: Bazaar Package Importer
  • Author(s): John Francesco Ferlito
  • Date: 2011-03-24 22:20:18 UTC
  • mfrom: (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110324222018-nxaid99rj5y5o6xe
Tags: 1.1.0-1
* New upstream release.
  - Remove debian/patches/snd_audio_bsd included upstream.
  - libao4: libao crashes when using pulse plugin. (Closes: #577645)
* Bumped standards version to 3.9.1.
* Added libroar support. (Closes: #589760)
* Removed quilt as no more patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#define AO_NAS_BUF_SIZE 4096
42
42
 
43
43
static char *ao_nas_options[] = {
44
 
  "host",    /* NAS server. See nas(1) for format. */
 
44
  "server",    /* NAS server. See nas(1) for format. */
 
45
  "host",    /* synonym for server */
45
46
  "buf_size", /* Buffer size on server */
46
47
  "quiet",
47
48
  "verbose",
59
60
        AO_FMT_NATIVE,
60
61
        10,
61
62
        ao_nas_options,
62
 
        6
 
63
        sizeof(ao_nas_options)/sizeof(*ao_nas_options)
63
64
};
64
65
 
65
66
 
116
117
{
117
118
        ao_nas_internal *internal = (ao_nas_internal *) device->internal;
118
119
 
119
 
        if (!strcmp(key, "host")) {
 
120
        if (!strcmp(key, "host") || !strcmp(key, "server")) {
120
121
          char *tmp = strdup (value);
121
122
          if (!tmp) return 0;
122
123
          if (internal->host) free (internal->host);
246
247
{
247
248
        ao_nas_internal *internal = (ao_nas_internal *) device->internal;
248
249
 
249
 
        AuStopFlow(internal->aud, internal->flow, 0);
250
 
        AuCloseServer(internal->aud);
 
250
        if(internal->aud){
 
251
          AuStopFlow(internal->aud, internal->flow, 0);
 
252
          AuCloseServer(internal->aud);
 
253
        }
251
254
        return 1;
252
255
}
253
256
 
256
259
{
257
260
        ao_nas_internal *internal = (ao_nas_internal *) device->internal;
258
261
 
259
 
        free(internal->host);
 
262
        if(internal->host)
 
263
          free(internal->host);
260
264
        free(internal);
 
265
        device->internal=NULL;
261
266
}