Commit 5ab29c50 authored by Ghislain MARY's avatar Ghislain MARY

Use void* type for user data and fix compilation warnings.

parent 2160bcf6
......@@ -393,7 +393,7 @@ ORTP_PUBLIC void rtp_session_set_recv_profile(RtpSession *session,RtpProfile *pr
ORTP_PUBLIC RtpProfile *rtp_session_get_profile(RtpSession *session);
ORTP_PUBLIC RtpProfile *rtp_session_get_send_profile(RtpSession *session);
ORTP_PUBLIC RtpProfile *rtp_session_get_recv_profile(RtpSession *session);
ORTP_PUBLIC int rtp_session_signal_connect(RtpSession *session,const char *signal_name, RtpCallback cb, unsigned long user_data);
ORTP_PUBLIC int rtp_session_signal_connect(RtpSession *session,const char *signal_name, RtpCallback cb, void *user_data);
ORTP_PUBLIC int rtp_session_signal_disconnect_by_callback(RtpSession *session,const char *signal_name, RtpCallback cb);
ORTP_PUBLIC void rtp_session_set_ssrc(RtpSession *session, uint32_t ssrc);
ORTP_PUBLIC uint32_t rtp_session_get_send_ssrc(RtpSession* session);
......
......@@ -27,7 +27,7 @@ typedef void (*RtpCallback)(struct _RtpSession *, unsigned long arg1, unsigned l
struct _RtpSignalTable
{
RtpCallback callback[RTP_CALLBACK_TABLE_MAX_ENTRIES];
unsigned long user_data[RTP_CALLBACK_TABLE_MAX_ENTRIES];
void * user_data[RTP_CALLBACK_TABLE_MAX_ENTRIES];
struct _RtpSession *session;
const char *signal_name;
int count;
......@@ -37,7 +37,7 @@ typedef struct _RtpSignalTable RtpSignalTable;
void rtp_signal_table_init(RtpSignalTable *table,struct _RtpSession *session, const char *signal_name);
int rtp_signal_table_add(RtpSignalTable *table,RtpCallback cb, unsigned long user_data);
int rtp_signal_table_add(RtpSignalTable *table,RtpCallback cb, void *user_data);
void rtp_signal_table_emit(RtpSignalTable *table);
......
......@@ -544,7 +544,7 @@ void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession * session, unsigned
**/
int
rtp_session_signal_connect (RtpSession * session, const char *signal_name,
RtpCallback cb, unsigned long user_data)
RtpCallback cb, void *user_data)
{
OList *elem;
for (elem=session->signal_tables;elem!=NULL;elem=o_list_next(elem)){
......
......@@ -31,7 +31,7 @@ void rtp_signal_table_init(RtpSignalTable *table,RtpSession *session, const char
session->signal_tables=o_list_append(session->signal_tables,(void*)table);
}
int rtp_signal_table_add(RtpSignalTable *table,RtpCallback cb, unsigned long user_data)
int rtp_signal_table_add(RtpSignalTable *table,RtpCallback cb, void *user_data)
{
int i;
......@@ -61,12 +61,12 @@ void rtp_signal_table_emit3(RtpSignalTable *table, unsigned long arg1, unsigned
void rtp_signal_table_emit(RtpSignalTable *table)
{
return rtp_signal_table_emit3(table, NULL, NULL);
return rtp_signal_table_emit3(table, 0, 0);
}
void rtp_signal_table_emit2(RtpSignalTable *table,unsigned long arg)
{
return rtp_signal_table_emit3(table, arg, NULL);
return rtp_signal_table_emit3(table, arg, 0);
}
int rtp_signal_table_remove_by_callback(RtpSignalTable *table,RtpCallback cb)
......
......@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
p_channel_id[i] = i;
/* register for telephony events */
rtp_session_signal_connect(session[i],"telephone-event",(RtpCallback)recv_tev_cb,(long)&p_channel_id[i]);
rtp_session_signal_connect(session[i],"telephone-event",(RtpCallback)recv_tev_cb,&p_channel_id[i]);
port+=2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment