Mercurial > hg > freeDiameter
comparison extensions/rt_busypeers/rtbusy.c @ 1284:38e4a7c318ac
Fix a number of compilation warnings
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Sun, 04 Jan 2015 00:55:57 +0800 |
parents | f09f16f432e6 |
children |
comparison
equal
deleted
inserted
replaced
1283:f09f16f432e6 | 1284:38e4a7c318ac |
---|---|
111 struct timespec expire; | 111 struct timespec expire; |
112 CHECK_SYS( clock_gettime(CLOCK_REALTIME, &expire) ); | 112 CHECK_SYS( clock_gettime(CLOCK_REALTIME, &expire) ); |
113 expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL); | 113 expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL); |
114 expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL; | 114 expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL; |
115 CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); | 115 CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); |
116 TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), re-sending: %s", senttolen, sentto, | 116 TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), re-sending: %s", (int)senttolen, sentto, |
117 rtbusy_conf.RelayTimeout, buf); | 117 rtbusy_conf.RelayTimeout, buf); |
118 free(buf); | 118 free(buf); |
119 CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &expire ) ); | 119 CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &expire ) ); |
120 } else { | 120 } else { |
121 CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) ); | 121 CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) ); |
125 if (is_req) { | 125 if (is_req) { |
126 char *buf = NULL; | 126 char *buf = NULL; |
127 size_t len; | 127 size_t len; |
128 | 128 |
129 CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); | 129 CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); |
130 TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), giving up and sending error reply: %s", senttolen, sentto, | 130 TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), giving up and sending error reply: %s", (int)senttolen, sentto, |
131 rtbusy_conf.RelayTimeout, buf); | 131 rtbusy_conf.RelayTimeout, buf); |
132 free(buf); | 132 free(buf); |
133 /* We must create an answer */ | 133 /* We must create an answer */ |
134 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, pmsg, MSGFL_ANSW_ERROR ) ); | 134 CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, pmsg, MSGFL_ANSW_ERROR ) ); |
135 | 135 |