~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy

« back to all changes in this revision

Viewing changes to xpp/astribank_usb.c

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Michel Dault, Tzafrir Cohen
  • Date: 2010-02-16 13:44:09 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100216134409-4y4k26mgzyra537o
Tags: 1:2.2.1-0ubuntu1
* Merge from Debian pkg-voip.
  * Changes from Debian:
  - debian/control: Change Maintainer
  - debian/control: Removed Uploaders field.
  - debian/control: Removed Debian Vcs-Svn entry and replaced with
      ubuntu-voip Vcs-Bzr, to reflect divergence in packages.
  - debian/control: Package dahdi Depends on  dahdi-dkms | dahdi-source

* From Debian pkg-voip:
[ Tzafrir Cohen ]
* New upstream release (Closes: #536257, #564381).
* Patch 'bashism' dropped: merged upstream. 
* Patch xpp_no_extra_at dropped: merged upstream. 
* Add an example genconf_parameters.
* Compat level 7.
* Bump standars version to 3.8.3.0 (no change needed)
* Udev rules are now in dahdi-linux.
* Patches perl_fix_noserial, perl_fix_transportdir: Fixes for some
  minor perl issues.
* Add the missing ${misc:Depends}, as per lintian. 
* Patch astribank_allow_ignoreend: an extra missing patch from upstream. 
* Patches init_unload_modules and init_unload_oslec: also unload OSLEC
  when unloading all modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "astribank_usb.h"
32
32
#include "debug.h"
33
33
 
34
 
static const char rcsid[] = "$Id: astribank_usb.c 6313 2009-04-02 20:56:42Z tzafrir $";
 
34
static const char rcsid[] = "$Id: astribank_usb.c 7474 2009-11-04 17:33:46Z tzafrir $";
35
35
 
36
36
#define DBG_MASK        0x01
37
37
#define TIMEOUT 500
262
262
                return 0;
263
263
        if(get_usb_string(astribank, iface_desc->iInterface, astribank->iInterface, BUFSIZ) < 0)
264
264
                return 0;
265
 
        INFO("ID=%04X:%04X Manufacturer=[%s] Product=[%s] SerialNumber=[%s] Interface=[%s]\n",
 
265
        DBG("ID=%04X:%04X Manufacturer=[%s] Product=[%s] SerialNumber=[%s] Interface=[%s]\n",
266
266
                dev_desc->idVendor,
267
267
                dev_desc->idProduct,
268
268
                astribank->iManufacturer,
332
332
 */
333
333
void show_astribank_info(const struct astribank_device *astribank)
334
334
{
 
335
        struct usb_device_descriptor    *dev_desc;
 
336
        struct usb_device               *dev;
 
337
 
335
338
        assert(astribank != NULL);
336
 
        printf("USB    Firmware Type: [%s]\n", astribank->fwtype->name);
337
 
        printf("USB    iManufacturer: [%s]\n", astribank->iManufacturer);
338
 
        printf("USB    iProduct:      [%s]\n", astribank->iProduct);
339
 
        printf("USB    iSerialNumber: [%s]\n", astribank->iSerialNumber);
 
339
        dev = astribank->dev;
 
340
        dev_desc = &dev->descriptor;
 
341
        if(verbose <= LOG_INFO) {
 
342
                INFO("usb:%s/%s: ID=%04X:%04X [%s / %s / %s]\n",
 
343
                        dev->bus->dirname,
 
344
                        dev->filename,
 
345
                        dev_desc->idVendor,
 
346
                        dev_desc->idProduct,
 
347
                        astribank->iManufacturer,
 
348
                        astribank->iProduct,
 
349
                        astribank->iSerialNumber);
 
350
        } else {
 
351
                printf("USB    Bus/Device:    [%s/%s]\n", dev->bus->dirname, dev->filename);
 
352
                printf("USB    Firmware Type: [%s]\n", astribank->fwtype->name);
 
353
                printf("USB    iManufacturer: [%s]\n", astribank->iManufacturer);
 
354
                printf("USB    iProduct:      [%s]\n", astribank->iProduct);
 
355
                printf("USB    iSerialNumber: [%s]\n", astribank->iSerialNumber);
 
356
        }
340
357
}
341
358
 
342
359
void astribank_close(struct astribank_device *astribank, int disconnected)