diff --git a/isup.c b/isup.c index 6e1f091..1e9705c 100644 --- a/isup.c +++ b/isup.c @@ -169,7 +169,7 @@ static void isup_dump_buffer(struct ss7 ss7_message(ss7, "]\n"); } -static void isup_get_number(char *dest, char *src, int srclen, int oddeven) +static void isup_get_number(unsigned char *dest, unsigned char *src, int srclen, int oddeven) { int i; for (i = 0; i < ((srclen * 2) - oddeven); i++) @@ -178,10 +178,10 @@ static void isup_get_number(char *dest, dest[i] = '\0'; } -static void isup_put_number(char *dest, char *src, int *len, int *oddeven) +static void isup_put_number(unsigned char *dest, unsigned char *src, int *len, int *oddeven) { int i = 0; - int numlen = strlen(src); + int numlen = strlen((char *) src); if (numlen % 2) { *oddeven = 1; @@ -418,7 +418,7 @@ static FUNC_SEND(range_and_status_transm static FUNC_DUMP(calling_party_num_dump) { int oddeven = (parm[0] >> 7) & 0x1; - char numbuf[64] = ""; + unsigned char numbuf[64] = ""; ss7_message(ss7, "PARM: Calling Party Number\n"); ss7_message(ss7, "Odd/even: %x\n", (parm[0] >> 7) & 0x1); @@ -514,14 +514,14 @@ struct isup_call * isup_new_call(struct return c; } -void isup_init_call(struct isup_call *c, int cic, char *calledpartynum, char *callingpartynum) +void isup_init_call(struct isup_call *c, int cic, unsigned char *calledpartynum, unsigned char *callingpartynum) { c->cic = cic; if (calledpartynum && calledpartynum[0]) - snprintf(c->called_party_num, sizeof(c->called_party_num), "%s*", calledpartynum); + snprintf((char *) c->called_party_num, sizeof(c->called_party_num), "%s*", calledpartynum); if (callingpartynum && callingpartynum[0]) - strncpy(c->calling_party_num, callingpartynum, sizeof(c->calling_party_num)); + strncpy((char *) c->calling_party_num, (char *) callingpartynum, sizeof(c->calling_party_num)); } @@ -876,8 +876,8 @@ int isup_receive(struct ss7 *ss7, struct e->e = ISUP_EVENT_IAM; e->iam.cic = c->cic; e->iam.transcap = c->transcap; - strncpy(e->iam.called_party_num, c->called_party_num, sizeof(e->iam.called_party_num)); - strncpy(e->iam.calling_party_num, c->calling_party_num, sizeof(e->iam.calling_party_num)); + strncpy((char *) e->iam.called_party_num, (char *) c->called_party_num, sizeof(e->iam.called_party_num)); + strncpy((char *) e->iam.calling_party_num, (char *) c->calling_party_num, sizeof(e->iam.calling_party_num)); e->iam.call = c; return 0; case ISUP_GRS: diff --git a/isup.h b/isup.h index 8845e1c..d6babf6 100644 --- a/isup.h +++ b/isup.h @@ -114,8 +114,8 @@ #define ISUP_MAX_NUM 64 struct mtp2; struct isup_call { - char called_party_num[ISUP_MAX_NUM]; - char calling_party_num[ISUP_MAX_NUM]; + unsigned char called_party_num[ISUP_MAX_NUM]; + unsigned char calling_party_num[ISUP_MAX_NUM]; int range; int echocan; int satellites; diff --git a/libss7.h b/libss7.h index 1d32621..c2d6eb8 100644 --- a/libss7.h +++ b/libss7.h @@ -156,5 +156,5 @@ int isup_gra(struct ss7 *ss7, int beginc int isup_grs(struct ss7 *ss7, int begincic, int endcic); -void isup_init_call(struct isup_call *c, int cic, char *calledpartynum, char *callingpartynum); +void isup_init_call(struct isup_call *c, int cic, unsigned char *calledpartynum, unsigned char *callingpartynum); #endif /* _LIBSS7_H */ diff --git a/mtp2.c b/mtp2.c index 5133221..f5f2e05 100644 --- a/mtp2.c +++ b/mtp2.c @@ -146,7 +146,7 @@ static int mtp2_queue_su(struct mtp2 *li return 0; } -static void make_lssu(struct mtp2 *link, unsigned char *buf, int *size, int lssu_status) +static void make_lssu(struct mtp2 *link, unsigned char *buf, unsigned int *size, int lssu_status) { struct mtp_su_head *head; @@ -174,7 +174,7 @@ static void make_lssu(struct mtp2 *link, head->data[0] = lssu_status; } -static void make_fisu(struct mtp2 *link, unsigned char *buf, int *size, int nack) +static void make_fisu(struct mtp2 *link, unsigned char *buf, unsigned int *size, int nack) { struct mtp_su_head *h; @@ -203,7 +203,7 @@ int mtp2_transmit(struct mtp2 *link) int res = 0; unsigned char *h; unsigned char buf[64]; - int size; + unsigned int size; struct ss7_msg *m = NULL; if (link->tx_q) diff --git a/mtp3.c b/mtp3.c index 07b3cfc..b951eec 100644 --- a/mtp3.c +++ b/mtp3.c @@ -145,7 +145,7 @@ static void std_test_send(struct mtp2 *l struct routing_label rl; struct ss7 *ss7 = link->master; int rllen = 0; - unsigned char testlen = strlen(testmessage); + unsigned char testlen = strlen((char *) testmessage); m = ss7_msg_new(); if (!m) { diff --git a/ss7.c b/ss7.c index 47f904c..76e50fe 100644 --- a/ss7.c +++ b/ss7.c @@ -269,7 +269,7 @@ int ss7_write(struct ss7 *ss7, int fd) int ss7_read(struct ss7 *ss7, int fd) { - char buf[1024]; + unsigned char buf[1024]; int res; int winner = -1; int i;