avoid none inlined memcpy with newer gcc versions

This commit is contained in:
Karsten Keil 2000-06-21 09:54:30 +00:00
parent 74e0a50e2f
commit f1375b15ea
8 changed files with 33 additions and 27 deletions

View File

@ -11,6 +11,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.45 2000/06/16 13:12:21 keil
* Support for SPID used by NI1
*
* Revision 2.44 2000/05/23 20:45:05 keil
* debug for wakeup callback
*
@ -530,7 +533,7 @@ lli_deliver_call(struct FsmInst *fi, int event, void *arg)
* No need to return "unknown" for calls without OAD,
* cause that's handled in linklevel now (replaced by '0')
*/
ic.parm.setup = chanp->proc->para.setup;
memcpy(&ic.parm.setup, &chanp->proc->para.setup, sizeof(setup_parm));
ret = chanp->cs->iif.statcallb(&ic);
if (chanp->debug & 1)
link_debug(chanp, 1, "statcallb ret=%d", ret);
@ -547,7 +550,7 @@ lli_deliver_call(struct FsmInst *fi, int event, void *arg)
FsmChangeState(fi, ST_IN_PROCEED_SEND);
chanp->d_st->lli.l4l3(chanp->d_st, CC_PROCEED_SEND | REQUEST, chanp->proc);
if (ret == 5) {
chanp->setup = ic.parm.setup;
memcpy(&chanp->setup, &ic.parm.setup, sizeof(setup_parm));
chanp->d_st->lli.l4l3(chanp->d_st, CC_REDIR | REQUEST, chanp->proc);
}
break;
@ -1686,7 +1689,7 @@ HiSax_command(isdn_ctrl * ic)
link_debug(chanp, 1, "DIAL %s -> %s (%d,%d)",
ic->parm.setup.eazmsn, ic->parm.setup.phone,
ic->parm.setup.si1, ic->parm.setup.si2);
chanp->setup = ic->parm.setup;
memcpy(&chanp->setup, &ic->parm.setup, sizeof(setup_parm));
if (!strcmp(chanp->setup.eazmsn, "0"))
chanp->setup.eazmsn[0] = '\0';
/* this solution is dirty and may be change, if
@ -1706,7 +1709,7 @@ HiSax_command(isdn_ctrl * ic)
break;
case (ISDN_CMD_ACCEPTD):
chanp = csta->channel + ic->arg;
chanp->setup = ic->parm.setup;
memcpy(&chanp->setup, &ic->parm.setup, sizeof(setup_parm));
if (chanp->debug & 1)
link_debug(chanp, 1, "ACCEPTD");
FsmEvent(&chanp->fi, EV_ACCEPTD, NULL);
@ -1903,7 +1906,7 @@ HiSax_command(isdn_ctrl * ic)
chanp = csta->channel + ic->arg;
if (chanp->debug & 1)
link_debug(chanp, 1, "REDIR");
chanp->setup = ic->parm.setup;
memcpy(&chanp->setup, &ic->parm.setup, sizeof(setup_parm));
FsmEvent(&chanp->fi, EV_REDIR, NULL);
break;

View File

@ -13,6 +13,9 @@
* Fritz Elfert
*
* $Log$
* Revision 2.27 2000/06/16 13:13:56 keil
* Support NI1 (US D-channel protocol)
*
* Revision 2.26 2000/05/19 18:40:57 keil
* implement codeset shift procedure for IE checking
*
@ -3239,7 +3242,7 @@ dss1down(struct PStack *st, int pr, void *arg)
if ((proc = dss1_new_l3_process(st, cr))) {
proc->chan = chan;
chan->proc = proc;
proc->para.setup = chan->setup;
memcpy(&proc->para.setup, &chan->setup, sizeof(setup_parm));
proc->callref = cr;
}
} else {

View File

@ -3072,7 +3072,7 @@ ni1down(struct PStack *st, int pr, void *arg)
if ((proc = ni1_new_l3_process(st, cr))) {
proc->chan = chan;
chan->proc = proc;
proc->para.setup = chan->setup;
memcpy(&proc->para.setup, &chan->setup, sizeof(setup_parm));
proc->callref = cr;
}
} else {

View File

@ -494,7 +494,7 @@ isdn_status_callback(isdn_ctrl * c)
return 0;
}
/* Try to find a network-interface which will accept incoming call */
r = ((c->command == ISDN_STAT_ICALLW) ? 0 : isdn_net_find_icall(di, c->arg, i, c->parm.setup));
r = ((c->command == ISDN_STAT_ICALLW) ? 0 : isdn_net_find_icall(di, c->arg, i, &c->parm.setup));
switch (r) {
case 0:
/* No network-device replies.
@ -503,7 +503,7 @@ isdn_status_callback(isdn_ctrl * c)
* 3 on eventually match, if CID is longer.
*/
if (c->command == ISDN_STAT_ICALL)
if ((retval = isdn_tty_find_icall(di, c->arg, c->parm.setup))) return(retval);
if ((retval = isdn_tty_find_icall(di, c->arg, &c->parm.setup))) return(retval);
#ifdef CONFIG_ISDN_DIVERSION
if (divert_if)
if ((retval = divert_if->stat_callback(c)))

View File

@ -2544,7 +2544,7 @@ isdn_net_swap_usage(int i1, int i2)
* would eventually match if CID was longer.
*/
int
isdn_net_find_icall(int di, int ch, int idx, setup_parm setup)
isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
{
char *eaz;
int si1;
@ -2564,19 +2564,19 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm setup)
/* Search name in netdev-chain */
save_flags(flags);
cli();
if (!setup.phone[0]) {
if (!setup->phone[0]) {
nr[0] = '0';
nr[1] = '\0';
printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n");
} else
strcpy(nr, setup.phone);
si1 = (int) setup.si1;
si2 = (int) setup.si2;
if (!setup.eazmsn[0]) {
strcpy(nr, setup->phone);
si1 = (int) setup->si1;
si2 = (int) setup->si2;
if (!setup->eazmsn[0]) {
printk(KERN_WARNING "isdn_net: Incoming call without CPN, assuming '0'\n");
eaz = "0";
} else
eaz = setup.eazmsn;
eaz = setup->eazmsn;
if (dev->net_verbose > 1)
printk(KERN_INFO "isdn_net: call from %s,%d,%d -> %s\n", nr, si1, si2, eaz);
/* Accept only calls with Si1 = 7 (Data-Transmission) */

View File

@ -75,7 +75,7 @@ extern int isdn_net_addphone(isdn_net_ioctl_phone *);
extern int isdn_net_getphones(isdn_net_ioctl_phone *, char *);
extern int isdn_net_getpeer(isdn_net_ioctl_phone *, isdn_net_ioctl_phone *);
extern int isdn_net_delphone(isdn_net_ioctl_phone *);
extern int isdn_net_find_icall(int, int, int, setup_parm);
extern int isdn_net_find_icall(int, int, int, setup_parm *);
extern void isdn_net_hangup(struct net_device *);
extern void isdn_net_dial(void);
extern void isdn_net_autohup(void);

View File

@ -2219,7 +2219,7 @@ isdn_tty_match_icall(char *cid, atemu *emu, int di)
* CID is longer.
*/
int
isdn_tty_find_icall(int di, int ch, setup_parm setup)
isdn_tty_find_icall(int di, int ch, setup_parm *setup)
{
char *eaz;
int i;
@ -2230,18 +2230,18 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
char *nr;
ulong flags;
if (!setup.phone[0]) {
if (!setup->phone[0]) {
nr = "0";
printk(KERN_INFO "isdn_tty: Incoming call without OAD, assuming '0'\n");
} else
nr = setup.phone;
si1 = (int) setup.si1;
si2 = (int) setup.si2;
if (!setup.eazmsn[0]) {
nr = setup->phone;
si1 = (int) setup->si1;
si2 = (int) setup->si2;
if (!setup->eazmsn[0]) {
printk(KERN_WARNING "isdn_tty: Incoming call without CPN, assuming '0'\n");
eaz = "0";
} else
eaz = setup.eazmsn;
eaz = setup->eazmsn;
#ifdef ISDN_DEBUG_MODEM_ICALL
printk(KERN_DEBUG "m_fi: eaz=%s si1=%d si2=%d\n", eaz, si1, si2);
#endif
@ -2283,8 +2283,8 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
strcpy(dev->num[idx], nr);
strcpy(info->emu.cpn, eaz);
info->emu.mdmreg[REG_SI1I] = si2bit[si1];
info->emu.mdmreg[REG_PLAN] = setup.plan;
info->emu.mdmreg[REG_SCREEN] = setup.screen;
info->emu.mdmreg[REG_PLAN] = setup->plan;
info->emu.mdmreg[REG_SCREEN] = setup->screen;
isdn_info_update();
restore_flags(flags);
printk(KERN_INFO "isdn_tty: call from %s, -> RING on ttyI%d\n", nr,

View File

@ -117,7 +117,7 @@ extern void isdn_tty_carrier_timeout(void);
extern void isdn_tty_modem_xmit(void);
extern int isdn_tty_modem_init(void);
extern void isdn_tty_readmodem(void);
extern int isdn_tty_find_icall(int, int, setup_parm);
extern int isdn_tty_find_icall(int, int, setup_parm *);
extern void isdn_tty_cleanup_xmit(modem_info *);
extern int isdn_tty_stat_callback(int, isdn_ctrl *);
extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);