Commit 917f5085 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by Linus Torvalds

[PATCH] isdn4linux: Siemens Gigaset drivers: code cleanup

With Hansjoerg Lipp <hjlipp@web.de>

Source code formatting cleanups for the Siemens Gigaset drivers, such as line
length, comments, removal of unused declarations, and typo corrections.  It
does not introduce any functional changes.
Signed-off-by: default avatarHansjoerg Lipp <hjlipp@web.de>
Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 08a53cdc
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
* published by the Free Software Foundation; either version 2 of * published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* ===================================================================== * =====================================================================
* ToDo: ...
* =====================================================================
* Version: $Id: asyncdata.c,v 1.2.2.7 2005/11/13 23:05:18 hjlipp Exp $
* =====================================================================
*/ */
#include "gigaset.h" #include "gigaset.h"
...@@ -58,7 +54,8 @@ static inline int cmd_loop(unsigned char c, unsigned char *src, int numbytes, ...@@ -58,7 +54,8 @@ static inline int cmd_loop(unsigned char c, unsigned char *src, int numbytes,
dbg(DEBUG_TRANSCMD, "%s: End of Command (%d Bytes)", dbg(DEBUG_TRANSCMD, "%s: End of Command (%d Bytes)",
__func__, cbytes); __func__, cbytes);
cs->cbytes = cbytes; cs->cbytes = cbytes;
gigaset_handle_modem_response(cs); /* can change cs->dle */ gigaset_handle_modem_response(cs); /* can change
cs->dle */
cbytes = 0; cbytes = 0;
if (cs->dle && if (cs->dle &&
...@@ -100,7 +97,8 @@ static inline int lock_loop(unsigned char *src, int numbytes, ...@@ -100,7 +97,8 @@ static inline int lock_loop(unsigned char *src, int numbytes,
{ {
struct cardstate *cs = inbuf->cs; struct cardstate *cs = inbuf->cs;
gigaset_dbg_buffer(DEBUG_LOCKCMD, "received response", numbytes, src, 0); gigaset_dbg_buffer(DEBUG_LOCKCMD, "received response",
numbytes, src, 0);
gigaset_if_receive(cs, src, numbytes); gigaset_if_receive(cs, src, numbytes);
return numbytes; return numbytes;
...@@ -392,8 +390,7 @@ void gigaset_m10x_input(struct inbuf_t *inbuf) ...@@ -392,8 +390,7 @@ void gigaset_m10x_input(struct inbuf_t *inbuf)
if (!(inbuf->inputstate & INS_DLE_char)) { if (!(inbuf->inputstate & INS_DLE_char)) {
/* FIXME Einfach je nach Modus Funktionszeiger in cs setzen [hier+hdlc_loop]? */ /* FIXME use function pointers? */
/* FIXME Spart folgendes "if" und ermoeglicht andere Protokolle */
if (inbuf->inputstate & INS_command) if (inbuf->inputstate & INS_command)
procbytes = cmd_loop(c, src, numbytes, inbuf); procbytes = cmd_loop(c, src, numbytes, inbuf);
else if (inbuf->bcs->proto2 == ISDN_PROTO_L2_HDLC) else if (inbuf->bcs->proto2 == ISDN_PROTO_L2_HDLC)
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
* published by the Free Software Foundation; either version 2 of * published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* ===================================================================== * =====================================================================
* ToDo: ...
* =====================================================================
* Version: $Id: bas-gigaset.c,v 1.52.4.19 2006/02/04 18:28:16 hjlipp Exp $
* =====================================================================
*/ */
#include "gigaset.h" #include "gigaset.h"
...@@ -70,9 +66,6 @@ static struct usb_device_id gigaset_table [] = { ...@@ -70,9 +66,6 @@ static struct usb_device_id gigaset_table [] = {
MODULE_DEVICE_TABLE(usb, gigaset_table); MODULE_DEVICE_TABLE(usb, gigaset_table);
/* Get a minor range for your devices from the usb maintainer */
#define USB_SKEL_MINOR_BASE 200
/*======================= local function prototypes =============================*/ /*======================= local function prototypes =============================*/
/* This function is called if a new device is connected to the USB port. It /* This function is called if a new device is connected to the USB port. It
...@@ -240,7 +233,8 @@ static inline void dump_urb(enum debuglevel level, const char *tag, ...@@ -240,7 +233,8 @@ static inline void dump_urb(enum debuglevel level, const char *tag,
(unsigned long) urb->context, (unsigned long) urb->context,
(unsigned long) urb->complete); (unsigned long) urb->complete);
for (i = 0; i < urb->number_of_packets; i++) { for (i = 0; i < urb->number_of_packets; i++) {
struct usb_iso_packet_descriptor *pifd = &urb->iso_frame_desc[i]; struct usb_iso_packet_descriptor *pifd
= &urb->iso_frame_desc[i];
dbg(level, dbg(level,
" {offset=%u, length=%u, actual_length=%u, " " {offset=%u, length=%u, actual_length=%u, "
"status=%u}", "status=%u}",
...@@ -777,10 +771,11 @@ static void read_iso_callback(struct urb *urb, struct pt_regs *regs) ...@@ -777,10 +771,11 @@ static void read_iso_callback(struct urb *urb, struct pt_regs *regs)
urb->iso_frame_desc[i].actual_length = 0; urb->iso_frame_desc[i].actual_length = 0;
} }
if (likely(atomic_read(&ubc->running))) { if (likely(atomic_read(&ubc->running))) {
urb->dev = bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */ urb->dev = bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */
urb->transfer_flags = URB_ISO_ASAP; urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = BAS_NUMFRAMES; urb->number_of_packets = BAS_NUMFRAMES;
dbg(DEBUG_ISO, "%s: isoc read overrun/resubmit", __func__); dbg(DEBUG_ISO, "%s: isoc read overrun/resubmit",
__func__);
rc = usb_submit_urb(urb, SLAB_ATOMIC); rc = usb_submit_urb(urb, SLAB_ATOMIC);
if (unlikely(rc != 0)) { if (unlikely(rc != 0)) {
err("could not resubmit isochronous read URB: %s", err("could not resubmit isochronous read URB: %s",
...@@ -989,7 +984,7 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx) ...@@ -989,7 +984,7 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
ubc = ucx->bcs->hw.bas; ubc = ucx->bcs->hw.bas;
IFNULLRETVAL(ubc, -EFAULT); IFNULLRETVAL(ubc, -EFAULT);
urb->dev = ucx->bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */ urb->dev = ucx->bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */
urb->transfer_flags = URB_ISO_ASAP; urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = ubc->isooutbuf->data; urb->transfer_buffer = ubc->isooutbuf->data;
urb->transfer_buffer_length = sizeof(ubc->isooutbuf->data); urb->transfer_buffer_length = sizeof(ubc->isooutbuf->data);
...@@ -1011,7 +1006,8 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx) ...@@ -1011,7 +1006,8 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
//dbg(DEBUG_ISO, "%s: frame %d length=%d", __func__, nframe, ifd->length); //dbg(DEBUG_ISO, "%s: frame %d length=%d", __func__, nframe, ifd->length);
/* retrieve block of data to send */ /* retrieve block of data to send */
ifd->offset = gigaset_isowbuf_getbytes(ubc->isooutbuf, ifd->length); ifd->offset = gigaset_isowbuf_getbytes(ubc->isooutbuf,
ifd->length);
if (ifd->offset < 0) { if (ifd->offset < 0) {
if (ifd->offset == -EBUSY) { if (ifd->offset == -EBUSY) {
dbg(DEBUG_ISO, "%s: buffer busy at frame %d", dbg(DEBUG_ISO, "%s: buffer busy at frame %d",
...@@ -1123,7 +1119,8 @@ static void write_iso_tasklet(unsigned long data) ...@@ -1123,7 +1119,8 @@ static void write_iso_tasklet(unsigned long data)
break; break;
case -EXDEV: /* inspect individual frames */ case -EXDEV: /* inspect individual frames */
/* assumptions (for lack of documentation): /* assumptions (for lack of documentation):
* - actual_length bytes of the frame in error are successfully sent * - actual_length bytes of the frame in error are
* successfully sent
* - all following frames are not sent at all * - all following frames are not sent at all
*/ */
dbg(DEBUG_ISO, "%s: URB partially completed", __func__); dbg(DEBUG_ISO, "%s: URB partially completed", __func__);
...@@ -1260,7 +1257,8 @@ static void read_iso_tasklet(unsigned long data) ...@@ -1260,7 +1257,8 @@ static void read_iso_tasklet(unsigned long data)
switch (urb->status) { switch (urb->status) {
case 0: /* normal completion */ case 0: /* normal completion */
break; break;
case -EXDEV: /* inspect individual frames (we do that anyway) */ case -EXDEV: /* inspect individual frames
(we do that anyway) */
dbg(DEBUG_ISO, "%s: URB partially completed", __func__); dbg(DEBUG_ISO, "%s: URB partially completed", __func__);
break; break;
case -ENOENT: case -ENOENT:
...@@ -1284,8 +1282,8 @@ static void read_iso_tasklet(unsigned long data) ...@@ -1284,8 +1282,8 @@ static void read_iso_tasklet(unsigned long data)
totleft = urb->actual_length; totleft = urb->actual_length;
for (frame = 0; totleft > 0 && frame < BAS_NUMFRAMES; frame++) { for (frame = 0; totleft > 0 && frame < BAS_NUMFRAMES; frame++) {
if (unlikely(urb->iso_frame_desc[frame].status)) { if (unlikely(urb->iso_frame_desc[frame].status)) {
warn("isochronous read: frame %d: %s", warn("isochronous read: frame %d: %s", frame,
frame, get_usb_statmsg(urb->iso_frame_desc[frame].status)); get_usb_statmsg(urb->iso_frame_desc[frame].status));
break; break;
} }
numbytes = urb->iso_frame_desc[frame].actual_length; numbytes = urb->iso_frame_desc[frame].actual_length;
...@@ -1318,7 +1316,7 @@ static void read_iso_tasklet(unsigned long data) ...@@ -1318,7 +1316,7 @@ static void read_iso_tasklet(unsigned long data)
urb->iso_frame_desc[frame].status = 0; urb->iso_frame_desc[frame].status = 0;
urb->iso_frame_desc[frame].actual_length = 0; urb->iso_frame_desc[frame].actual_length = 0;
} }
urb->dev = bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */ urb->dev = bcs->cs->hw.bas->udev; /* clobbered by USB subsystem */
urb->transfer_flags = URB_ISO_ASAP; urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = BAS_NUMFRAMES; urb->number_of_packets = BAS_NUMFRAMES;
if ((rc = usb_submit_urb(urb, SLAB_ATOMIC)) != 0) { if ((rc = usb_submit_urb(urb, SLAB_ATOMIC)) != 0) {
...@@ -1792,7 +1790,8 @@ static int start_cbsend(struct cardstate *cs) ...@@ -1792,7 +1790,8 @@ static int start_cbsend(struct cardstate *cs)
* cs controller state structure * cs controller state structure
* buf command string to send * buf command string to send
* len number of bytes to send (max. IF_WRITEBUF) * len number of bytes to send (max. IF_WRITEBUF)
* wake_tasklet tasklet to run when transmission is completed (NULL if none) * wake_tasklet tasklet to run when transmission is completed
* (NULL if none)
* return value: * return value:
* number of bytes queued on success * number of bytes queued on success
* error code < 0 on error * error code < 0 on error
...@@ -1849,7 +1848,8 @@ static int gigaset_write_cmd(struct cardstate *cs, ...@@ -1849,7 +1848,8 @@ static int gigaset_write_cmd(struct cardstate *cs,
/* gigaset_write_room /* gigaset_write_room
* tty_driver.write_room interface routine * tty_driver.write_room interface routine
* return number of characters the driver will accept to be written via gigaset_write_cmd * return number of characters the driver will accept to be written via
* gigaset_write_cmd
* parameter: * parameter:
* controller state structure * controller state structure
* return value: * return value:
...@@ -2299,7 +2299,8 @@ static int __init bas_gigaset_init(void) ...@@ -2299,7 +2299,8 @@ static int __init bas_gigaset_init(void)
goto error; goto error;
/* allocate memory for our device state and intialize it */ /* allocate memory for our device state and intialize it */
cardstate = gigaset_initcs(driver, 2, 0, 0, cidmode, GIGASET_MODULENAME); cardstate = gigaset_initcs(driver, 2, 0, 0, cidmode,
GIGASET_MODULENAME);
if (!cardstate) if (!cardstate)
goto error; goto error;
......
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
* published by the Free Software Foundation; either version 2 of * published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* ===================================================================== * =====================================================================
* ToDo: ...
* =====================================================================
* Version: $Id: common.c,v 1.104.4.22 2006/02/04 18:28:16 hjlipp Exp $
* =====================================================================
*/ */
#include "gigaset.h" #include "gigaset.h"
...@@ -101,7 +97,8 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg, ...@@ -101,7 +97,8 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg,
} else { } else {
numin = len < sizeof inbuf ? len : sizeof inbuf; numin = len < sizeof inbuf ? len : sizeof inbuf;
in = inbuf; in = inbuf;
if (copy_from_user(inbuf, (const unsigned char __user *) buf, numin)) { if (copy_from_user(inbuf, (const unsigned char __user *) buf,
numin)) {
strncpy(inbuf, "<FAULT>", sizeof inbuf); strncpy(inbuf, "<FAULT>", sizeof inbuf);
numin = sizeof "<FAULT>" - 1; numin = sizeof "<FAULT>" - 1;
} }
...@@ -425,7 +422,8 @@ void gigaset_freecs(struct cardstate *cs) ...@@ -425,7 +422,8 @@ void gigaset_freecs(struct cardstate *cs)
spin_lock_irqsave(&cs->lock, flags); spin_lock_irqsave(&cs->lock, flags);
atomic_set(&cs->running, 0); atomic_set(&cs->running, 0);
spin_unlock_irqrestore(&cs->lock, flags); /* event handler and timer are not rescheduled below */ spin_unlock_irqrestore(&cs->lock, flags); /* event handler and timer are
not rescheduled below */
tasklet_kill(&cs->event_tasklet); tasklet_kill(&cs->event_tasklet);
del_timer_sync(&cs->timer); del_timer_sync(&cs->timer);
...@@ -563,7 +561,6 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, ...@@ -563,7 +561,6 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
if (cs->ops->initbcshw(bcs)) if (cs->ops->initbcshw(bcs))
return bcs; return bcs;
//error:
dbg(DEBUG_INIT, " failed"); dbg(DEBUG_INIT, " failed");
dbg(DEBUG_INIT, " freeing bcs[%d]->skb", channel); dbg(DEBUG_INIT, " freeing bcs[%d]->skb", channel);
...@@ -580,7 +577,8 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs, ...@@ -580,7 +577,8 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
* parameters: * parameters:
* drv hardware driver the device belongs to * drv hardware driver the device belongs to
* channels number of B channels supported by device * channels number of B channels supported by device
* onechannel !=0: B channel data and AT commands share one communication channel * onechannel !=0: B channel data and AT commands share one
* communication channel
* ==0: B channels have separate communication channels * ==0: B channels have separate communication channels
* ignoreframes number of frames to ignore after setting up B channel * ignoreframes number of frames to ignore after setting up B channel
* cidmode !=0: start in CallID mode * cidmode !=0: start in CallID mode
...@@ -619,7 +617,8 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, ...@@ -619,7 +617,8 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
atomic_set(&cs->ev_tail, 0); atomic_set(&cs->ev_tail, 0);
atomic_set(&cs->ev_head, 0); atomic_set(&cs->ev_head, 0);
init_MUTEX_LOCKED(&cs->sem); init_MUTEX_LOCKED(&cs->sem);
tasklet_init(&cs->event_tasklet, &gigaset_handle_event, (unsigned long) cs); tasklet_init(&cs->event_tasklet, &gigaset_handle_event,
(unsigned long) cs);
atomic_set(&cs->commands_pending, 0); atomic_set(&cs->commands_pending, 0);
cs->cur_at_seq = 0; cs->cur_at_seq = 0;
cs->gotfwver = -1; cs->gotfwver = -1;
...@@ -669,14 +668,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, ...@@ -669,14 +668,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
cs->curlen = 0; cs->curlen = 0;
cs->cmdbytes = 0; cs->cmdbytes = 0;
/*
* Tell the ISDN4Linux subsystem (the LL) that
* a driver for a USB-Device is available !
* If this is done, "isdnctrl" is able to bind a device for this driver even
* if no physical usb-device is currently connected.
* But this device will just be accessable if a physical USB device is connected
* (via "gigaset_probe") .
*/
dbg(DEBUG_INIT, "setting up iif"); dbg(DEBUG_INIT, "setting up iif");
if (!gigaset_register_to_LL(cs, modulename)) { if (!gigaset_register_to_LL(cs, modulename)) {
err("register_isdn=>error"); err("register_isdn=>error");
...@@ -713,7 +704,8 @@ error: if (cs) ...@@ -713,7 +704,8 @@ error: if (cs)
} }
EXPORT_SYMBOL_GPL(gigaset_initcs); EXPORT_SYMBOL_GPL(gigaset_initcs);
/* ReInitialize the b-channel structure */ /* e.g. called on hangup, disconnect */ /* ReInitialize the b-channel structure */
/* e.g. called on hangup, disconnect */
void gigaset_bcs_reinit(struct bc_state *bcs) void gigaset_bcs_reinit(struct bc_state *bcs)
{ {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -723,7 +715,7 @@ void gigaset_bcs_reinit(struct bc_state *bcs) ...@@ -723,7 +715,7 @@ void gigaset_bcs_reinit(struct bc_state *bcs)
while ((skb = skb_dequeue(&bcs->squeue)) != NULL) while ((skb = skb_dequeue(&bcs->squeue)) != NULL)
dev_kfree_skb(skb); dev_kfree_skb(skb);
spin_lock_irqsave(&cs->lock, flags); //FIXME spin_lock_irqsave(&cs->lock, flags);
clear_at_state(&bcs->at_state); clear_at_state(&bcs->at_state);
bcs->at_state.ConState = 0; bcs->at_state.ConState = 0;
bcs->at_state.timer_active = 0; bcs->at_state.timer_active = 0;
...@@ -805,7 +797,6 @@ int gigaset_start(struct cardstate *cs) ...@@ -805,7 +797,6 @@ int gigaset_start(struct cardstate *cs)
{ {
if (down_interruptible(&cs->sem)) if (down_interruptible(&cs->sem))
return 0; return 0;
//info("USB device for Gigaset 307x now attached to Dev %d", ucs->minor);
atomic_set(&cs->connected, 1); atomic_set(&cs->connected, 1);
...@@ -954,7 +945,8 @@ void gigaset_debugdrivers(void) ...@@ -954,7 +945,8 @@ void gigaset_debugdrivers(void)
dbg(DEBUG_DRIVER, " flags 0x%02x", drv->flags[i]); dbg(DEBUG_DRIVER, " flags 0x%02x", drv->flags[i]);
cs = drv->cs + i; cs = drv->cs + i;
dbg(DEBUG_DRIVER, " cardstate %p", cs); dbg(DEBUG_DRIVER, " cardstate %p", cs);
dbg(DEBUG_DRIVER, " minor_index %u", cs->minor_index); dbg(DEBUG_DRIVER, " minor_index %u",
cs->minor_index);
dbg(DEBUG_DRIVER, " driver %p", cs->driver); dbg(DEBUG_DRIVER, " driver %p", cs->driver);
dbg(DEBUG_DRIVER, " i4l id %d", cs->myid); dbg(DEBUG_DRIVER, " i4l id %d", cs->myid);
} }
...@@ -1016,7 +1008,7 @@ EXPORT_SYMBOL_GPL(gigaset_freedriver); ...@@ -1016,7 +1008,7 @@ EXPORT_SYMBOL_GPL(gigaset_freedriver);
* parameters: * parameters:
* minor First minor number * minor First minor number
* minors Number of minors this driver can handle * minors Number of minors this driver can handle
* procname Name of the driver (e.g. for /proc/tty/drivers, path in /proc/driver) * procname Name of the driver
* devname Name of the device files (prefix without minor number) * devname Name of the device files (prefix without minor number)
* devfsname Devfs name of the device files without %d * devfsname Devfs name of the device files without %d
* return value: * return value:
......
...@@ -11,82 +11,78 @@ ...@@ -11,82 +11,78 @@
* published by the Free Software Foundation; either version 2 of * published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* ===================================================================== * =====================================================================
* ToDo: ...
* =====================================================================
* Version: $Id: ev-layer.c,v 1.4.2.18 2006/02/04 18:28:16 hjlipp Exp $
* =====================================================================
*/ */
#include "gigaset.h" #include "gigaset.h"
/* ========================================================== */ /* ========================================================== */
/* bit masks for pending commands */ /* bit masks for pending commands */
#define PC_INIT 0x004 #define PC_DIAL 0x001
#define PC_DLE0 0x008 #define PC_HUP 0x002
#define PC_DLE1 0x010 #define PC_INIT 0x004
#define PC_CID 0x080 #define PC_DLE0 0x008
#define PC_NOCID 0x100 #define PC_DLE1 0x010
#define PC_HUP 0x002 #define PC_SHUTDOWN 0x020
#define PC_DIAL 0x001 #define PC_ACCEPT 0x040
#define PC_ACCEPT 0x040 #define PC_CID 0x080
#define PC_SHUTDOWN 0x020 #define PC_NOCID 0x100
#define PC_CIDMODE 0x200 #define PC_CIDMODE 0x200
#define PC_UMMODE 0x400 #define PC_UMMODE 0x400
/* types of modem responses */ /* types of modem responses */
#define RT_NOTHING 0 #define RT_NOTHING 0
#define RT_ZSAU 1 #define RT_ZSAU 1
#define RT_RING 2 #define RT_RING 2
#define RT_NUMBER 3 #define RT_NUMBER 3
#define RT_STRING 4 #define RT_STRING 4
#define RT_HEX 5 #define RT_HEX 5
#define RT_ZCAU 6 #define RT_ZCAU 6
/* Possible ASCII responses */ /* Possible ASCII responses */
#define RSP_OK 0 #define RSP_OK 0
//#define RSP_BUSY 1 //#define RSP_BUSY 1
//#define RSP_CONNECT 2 //#define RSP_CONNECT 2
#define RSP_ZGCI 3 #define RSP_ZGCI 3
#define RSP_RING 4 #define RSP_RING 4
#define RSP_ZAOC 5 #define RSP_ZAOC 5
#define RSP_ZCSTR 6 #define RSP_ZCSTR 6
#define RSP_ZCFGT 7 #define RSP_ZCFGT 7
#define RSP_ZCFG 8 #define RSP_ZCFG 8
#define RSP_ZCCR 9 #define RSP_ZCCR 9
#define RSP_EMPTY 10 #define RSP_EMPTY 10
#define RSP_ZLOG 11 #define RSP_ZLOG 11
#define RSP_ZCAU 12 #define RSP_ZCAU 12
#define RSP_ZMWI 13 #define RSP_ZMWI 13
#define RSP_ZABINFO 14 #define RSP_ZABINFO 14
#define RSP_ZSMLSTCHG 15 #define RSP_ZSMLSTCHG 15
#define RSP_VAR 100 #define RSP_VAR 100
#define RSP_ZSAU (RSP_VAR + VAR_ZSAU) #define RSP_ZSAU (RSP_VAR + VAR_ZSAU)
#define RSP_ZDLE (RSP_VAR + VAR_ZDLE) #define RSP_ZDLE (RSP_VAR + VAR_ZDLE)
#define RSP_ZVLS (RSP_VAR + VAR_ZVLS) #define RSP_ZVLS (RSP_VAR + VAR_ZVLS)
#define RSP_ZCTP (RSP_VAR + VAR_ZCTP) #define RSP_ZCTP (RSP_VAR + VAR_ZCTP)
#define RSP_STR (RSP_VAR + VAR_NUM) #define RSP_STR (RSP_VAR + VAR_NUM)
#define RSP_NMBR (RSP_STR + STR_NMBR) #define RSP_NMBR (RSP_STR + STR_NMBR)
#define RSP_ZCPN (RSP_STR + STR_ZCPN) #define RSP_ZCPN (RSP_STR + STR_ZCPN)
#define RSP_ZCON (RSP_STR + STR_ZCON) #define RSP_ZCON (RSP_STR + STR_ZCON)
#define RSP_ZBC (RSP_STR + STR_ZBC) #define RSP_ZBC (RSP_STR + STR_ZBC)
#define RSP_ZHLC (RSP_STR + STR_ZHLC) #define RSP_ZHLC (RSP_STR + STR_ZHLC)
#define RSP_ERROR -1 /* ERROR */ #define RSP_ERROR -1 /* ERROR */
#define RSP_WRONG_CID -2 /* unknown cid in cmd */ #define RSP_WRONG_CID -2 /* unknown cid in cmd */
//#define RSP_EMPTY -3 //#define RSP_EMPTY -3
#define RSP_UNKNOWN -4 /* unknown response */ #define RSP_UNKNOWN -4 /* unknown response */
#define RSP_FAIL -5 /* internal error */ #define RSP_FAIL -5 /* internal error */
#define RSP_INVAL -6 /* invalid response */ #define RSP_INVAL -6 /* invalid response */
#define RSP_NONE -19 #define RSP_NONE -19
#define RSP_STRING -20 #define RSP_STRING -20
#define RSP_NULL -21 #define RSP_NULL -21
//#define RSP_RETRYFAIL -22 //#define RSP_RETRYFAIL -22
//#define RSP_RETRY -23 //#define RSP_RETRY -23
//#define RSP_SKIP -24 //#define RSP_SKIP -24
#define RSP_INIT -27 #define RSP_INIT -27
#define RSP_ANY -26 #define RSP_ANY -26
#define RSP_LAST -28 #define RSP_LAST -28
#define RSP_NODEV -9 #define RSP_NODEV -9
/* actions for process_response */ /* actions for process_response */
#define ACT_NOTHING 0 #define ACT_NOTHING 0
...@@ -112,7 +108,7 @@ ...@@ -112,7 +108,7 @@
#define ACT_DISCONNECT 20 #define ACT_DISCONNECT 20
#define ACT_CONNECT 21 #define ACT_CONNECT 21
#define ACT_REMOTEREJECT 22 #define ACT_REMOTEREJECT 22
#define ACT_CONNTIMEOUT 23 #define ACT_CONNTIMEOUT 23
#define ACT_REMOTEHUP 24 #define ACT_REMOTEHUP 24
#define ACT_ABORTHUP 25 #define ACT_ABORTHUP 25
#define ACT_ICALL 26 #define ACT_ICALL 26
...@@ -127,40 +123,40 @@ ...@@ -127,40 +123,40 @@
#define ACT_ERROR 35 #define ACT_ERROR 35
#define ACT_ABORTCID 36 #define ACT_ABORTCID 36
#define ACT_ZCAU 37 #define ACT_ZCAU 37
#define ACT_NOTIFY_BC_DOWN 38 #define ACT_NOTIFY_BC_DOWN 38
#define ACT_NOTIFY_BC_UP 39 #define ACT_NOTIFY_BC_UP 39
#define ACT_DIAL 40 #define ACT_DIAL 40
#define ACT_ACCEPT 41 #define ACT_ACCEPT 41
#define ACT_PROTO_L2 42 #define ACT_PROTO_L2 42
#define ACT_HUP 43 #define ACT_HUP 43
#define ACT_IF_LOCK 44 #define ACT_IF_LOCK 44
#define ACT_START 45 #define ACT_START 45
#define ACT_STOP 46 #define ACT_STOP 46
#define ACT_FAKEDLE0 47 #define ACT_FAKEDLE0 47
#define ACT_FAKEHUP 48 #define ACT_FAKEHUP 48
#define ACT_FAKESDOWN 49 #define ACT_FAKESDOWN 49
#define ACT_SHUTDOWN 50 #define ACT_SHUTDOWN 50
#define ACT_PROC_CIDMODE 51 #define ACT_PROC_CIDMODE 51
#define ACT_UMODESET 52 #define ACT_UMODESET 52
#define ACT_FAILUMODE 53 #define ACT_FAILUMODE 53