Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

bool mpd_sync_send_command_v ( struct mpd_async async,
const struct timeval *  tv,
const char *  command,
va_list  args 

Synchronous wrapper for mpd_async_send_command_v().

Definition at line 113 of file sync.c.

References mpd_async_get_error(), mpd_async_send_command_v(), and MPD_ERROR_SUCCESS.

      struct timeval tv, *tvp;
      va_list copy;
      bool success;

      if (tv0 != NULL) {
            tv = *tv0;
            tvp = &tv;
      } else
            tvp = NULL;

      while (true) {
            va_copy(copy, args);
            success = mpd_async_send_command_v(async, command, copy);

            if (success)
                  return true;

            if (mpd_async_get_error(async) != MPD_ERROR_SUCCESS ||
                !mpd_sync_io(async, tvp))
                  return false;

Generated by  Doxygen 1.6.0   Back to index