static int *misdn_ports;
-static void chan_misdn_log(int level, int port, char *tmpl, ...);
+static void chan_misdn_log(int level, int port, char *tmpl, ...)
+ __attribute__ ((format (printf, 3, 4)));
static struct ast_channel *misdn_new(struct chan_list *cl, int state, char *exten, char *callerid, int format, int port, int c);
static void send_digit_to_chan(struct chan_list *cl, char digit );
else if (fac->u.AOCDcur.freeOfCharge)
chan_misdn_log(1,bc->port," --> AOCD currency: free of charge\n");
else if (fac->u.AOCDchu.billingId >= 0)
- chan_misdn_log(1,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%d billingId:%d\n",
+ chan_misdn_log(1,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%s billingId:%d\n",
fac->u.AOCDcur.currency, fac->u.AOCDcur.currencyAmount, fac->u.AOCDcur.multiplier,
(fac->u.AOCDcur.typeOfChargingInfo == 0) ? "subTotal" : "total", fac->u.AOCDcur.billingId);
else
- chan_misdn_log(1,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%d\n",
+ chan_misdn_log(1,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%s\n",
fac->u.AOCDcur.currency, fac->u.AOCDcur.currencyAmount, fac->u.AOCDcur.multiplier,
(fac->u.AOCDcur.typeOfChargingInfo == 0) ? "subTotal" : "total");
break;
int res;
int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples);
- chan_misdn_log(9, bc->port, "TONE_GEN: len:%d\n");
+ chan_misdn_log(9, bc->port, "TONE_GEN: len:%d\n", tone_len);
if (!ast)
break;
#endif
break;
default:
- chan_misdn_log(0, bc->port," --> not yet handled: facility type:%p\n", bc->fac_in.Function);
+ chan_misdn_log(0, bc->port," --> not yet handled: facility type:%d\n", bc->fac_in.Function);
}
break;
jb->state_buffer = wp - rp;
else
jb->state_buffer = jb->size - rp + wp;
- chan_misdn_log(9, 0, "misdn_jb_fill: written:%d | Bufferstatus:%d p:%x\n", len, jb->state_buffer, jb);
+ chan_misdn_log(9, 0, "misdn_jb_fill: written:%d | Bufferstatus:%d p:%p\n", len, jb->state_buffer, jb);
if (jb->state_full) {
jb->wp = wp;
jb->state_buffer = wp - rp;
else
jb->state_buffer = jb->size - rp + wp;
- chan_misdn_log(9, 0, "misdn_jb_empty: read:%d | Bufferstatus:%d p:%x\n", len, jb->state_buffer, jb);
+ chan_misdn_log(9, 0, "misdn_jb_empty: read:%d | Bufferstatus:%d p:%p\n", len, jb->state_buffer, jb);
jb->rp = rp;
} else
- chan_misdn_log(9, 0, "misdn_jb_empty: Wait...requested:%d p:%x\n", len, jb);
+ chan_misdn_log(9, 0, "misdn_jb_empty: Wait...requested:%d p:%p\n", len, jb);
ast_mutex_unlock(&jb->mutexjb);
cb_log(5, stack->port, " --> urate:%d rate:%d mode:%d user1:%d\n", bc->urate, bc->rate, bc->mode,bc->user1);
- cb_log(5, stack->port, " --> bc:%x h:%d sh:%d\n", bc, bc->holded, bc->stack_holder);
+ cb_log(5, stack->port, " --> bc:%p h:%d sh:%d\n", bc, bc->holded, bc->stack_holder);
}
void misdn_send_lock(struct misdn_bchannel *bc);
{
struct misdn_bchannel *help;
- cb_log(4,stack?stack->port:0, "*HOLDER: find %x\n",l3id);
+ cb_log(4,stack?stack->port:0, "*HOLDER: find %lx\n",l3id);
if (!stack) return NULL;
enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
-void (*cb_log) (int level, int port, char *tmpl, ...);
+void (*cb_log) (int level, int port, char *tmpl, ...)
+ __attribute__ ((format (printf, 3, 4)));
int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
struct misdn_lib_iface {
enum event_response_e (*cb_event)(enum event_e event, struct misdn_bchannel *bc, void *user_data);
- void (*cb_log)(int level, int port, char *tmpl, ...);
+ void (*cb_log)(int level, int port, char *tmpl, ...)
+ __attribute__ ((format (printf, 3, 4)));
int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
};