/* Parameter: card = pointer to card struct. s = pointer to message-string. ch = channel: 0 = generic messages, 1 and 2 = D-channel messages. Return: 0 on success, 1 on memory squeeze.  */
static int isdnloop_fake(isdnloop_card *card, char *s, int ch)
/* Parameter: card = pointer to card struct. s = pointer to message-string. ch = channel: 0 = generic messages, 1 and 2 = D-channel messages. Return: 0 on success, 1 on memory squeeze.  */
static int isdnloop_fake(isdnloop_card *card, char *s, int ch)
{
	struct sk_buff *skb;
	int len = strlen(s) + ((ch >= 0) ? 3 : 0);
	if (!(skb = dev_alloc_skb(len))) {
		printk(KERN_WARNING "isdnloop: Out of memory in isdnloop_fake\n");
		return 1;
	}
	if (ch >= 0)
		sprintf(skb_put(skb, 3), "%02d;", ch);
	memcpy(skb_put(skb, strlen(s)), s, strlen(s));
	skb_queue_tail(&card->dqueue, skb);
	return 0;
}