summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/ael/pval.c2
-rw-r--r--res/parking/parking_bridge.c2
-rw-r--r--res/parking/parking_bridge_features.c6
-rw-r--r--res/parking/parking_manager.c2
-rw-r--r--res/res_agi.c4
-rw-r--r--res/res_ari_model.c2
-rw-r--r--res/res_calendar.c8
-rw-r--r--res/res_calendar_caldav.c7
-rw-r--r--res/res_calendar_ews.c2
-rw-r--r--res/res_calendar_icalendar.c2
-rw-r--r--res/res_config_odbc.c6
-rw-r--r--res/res_corosync.c10
-rw-r--r--res/res_crypto.c2
-rw-r--r--res/res_fax.c56
-rw-r--r--res/res_fax_spandsp.c24
-rw-r--r--res/res_format_attr_celt.c6
-rw-r--r--res/res_format_attr_h263.c8
-rw-r--r--res/res_format_attr_h264.c6
-rw-r--r--res/res_format_attr_opus.c14
-rw-r--r--res/res_format_attr_silk.c10
-rw-r--r--res/res_http_websocket.c8
-rw-r--r--res/res_jabber.c22
-rw-r--r--res/res_monitor.c4
-rw-r--r--res/res_musiconhold.c2
-rw-r--r--res/res_odbc.c2
-rw-r--r--res/res_pjsip/config_transport.c6
-rw-r--r--res/res_pjsip/location.c4
-rw-r--r--res/res_pjsip/pjsip_configuration.c6
-rw-r--r--res/res_pjsip_outbound_registration.c8
-rw-r--r--res/res_pjsip_pubsub.c2
-rw-r--r--res/res_pjsip_refer.c4
-rw-r--r--res/res_pjsip_registrar.c2
-rw-r--r--res/res_pjsip_sdp_rtp.c6
-rw-r--r--res/res_pjsip_t38.c8
-rw-r--r--res/res_pktccops.c19
-rw-r--r--res/res_rtp_asterisk.c48
-rw-r--r--res/res_sorcery_config.c2
-rw-r--r--res/res_srtp.c10
-rw-r--r--res/res_stasis_playback.c4
-rw-r--r--res/res_stasis_recording.c6
-rw-r--r--res/res_stasis_snoop.c2
-rw-r--r--res/res_stun_monitor.c2
-rw-r--r--res/res_timing_dahdi.c2
-rw-r--r--res/res_xmpp.c4
44 files changed, 183 insertions, 179 deletions
diff --git a/res/ael/pval.c b/res/ael/pval.c
index dc05cf7f1..c0da0f03f 100644
--- a/res/ael/pval.c
+++ b/res/ael/pval.c
@@ -1388,7 +1388,7 @@ static void find_pval_goto_item(pval *item, int lev)
struct pval *p4;
if (lev>100) {
- ast_log(LOG_ERROR,"find_pval_goto in infinite loop! item_type: %d\n\n", item->type);
+ ast_log(LOG_ERROR,"find_pval_goto in infinite loop! item_type: %u\n\n", item->type);
return;
}
diff --git a/res/parking/parking_bridge.c b/res/parking/parking_bridge.c
index e1fd5f8fe..4f7198b4f 100644
--- a/res/parking/parking_bridge.c
+++ b/res/parking/parking_bridge.c
@@ -304,7 +304,7 @@ static int bridge_parking_push(struct ast_bridge_parking *self, struct ast_bridg
if (!strcmp(blind_transfer, ast_channel_name(bridge_channel->chan)) && !park_datastore->silence_announce) {
char saynum_buf[16];
- snprintf(saynum_buf, sizeof(saynum_buf), "%u %u", 0, pu->parking_space);
+ snprintf(saynum_buf, sizeof(saynum_buf), "%d %d", 0, pu->parking_space);
ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL);
}
diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c
index 9840b294c..f9295ccc3 100644
--- a/res/parking/parking_bridge_features.c
+++ b/res/parking/parking_bridge_features.c
@@ -115,7 +115,7 @@ static void parker_parked_call_message_response(struct ast_parked_call_payload *
if (message->event_type == PARKED_CALL) {
/* queue the saynum on the bridge channel and hangup */
- snprintf(saynum_buf, sizeof(saynum_buf), "%u %u", data->hangup_after, message->parkingspace);
+ snprintf(saynum_buf, sizeof(saynum_buf), "%d %u", data->hangup_after, message->parkingspace);
ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL);
wipe_subscription_datastore(bridge_channel->chan);
}
@@ -609,8 +609,8 @@ abandon_extension_creation:
void say_parking_space(struct ast_bridge_channel *bridge_channel, const char *payload)
{
- int numeric_value;
- int hangup_after;
+ unsigned int numeric_value;
+ unsigned int hangup_after;
if (sscanf(payload, "%u %u", &hangup_after, &numeric_value) != 2) {
/* If say_parking_space is called with a non-numeric string, we have a problem. */
diff --git a/res/parking/parking_manager.c b/res/parking/parking_manager.c
index 55ce85a35..92854feb2 100644
--- a/res/parking/parking_manager.c
+++ b/res/parking/parking_manager.c
@@ -389,7 +389,7 @@ static int manager_append_event_parking_lot_data_cb(void *obj, void *arg, void *
"Name: %s\r\n"
"StartSpace: %d\r\n"
"StopSpace: %d\r\n"
- "Timeout: %d\r\n"
+ "Timeout: %u\r\n"
"%s" /* The Action ID */
"\r\n",
curlot->name,
diff --git a/res/res_agi.c b/res/res_agi.c
index 96d3906ac..e223603a6 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2827,7 +2827,7 @@ static int handle_channelstatus(struct ast_channel *chan, AGI *agi, int argc, co
{
if (argc == 2) {
/* no argument: supply info on the current channel */
- ast_agi_send(agi->fd, chan, "200 result=%d\n", ast_channel_state(chan));
+ ast_agi_send(agi->fd, chan, "200 result=%u\n", ast_channel_state(chan));
return RESULT_SUCCESS;
} else if (argc == 3) {
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
@@ -2836,7 +2836,7 @@ static int handle_channelstatus(struct ast_channel *chan, AGI *agi, int argc, co
if ((msg = stasis_cache_get(ast_channel_cache_by_name(), ast_channel_snapshot_type(), argv[2]))) {
struct ast_channel_snapshot *snapshot = stasis_message_data(msg);
- ast_agi_send(agi->fd, chan, "200 result=%d\n", snapshot->state);
+ ast_agi_send(agi->fd, chan, "200 result=%u\n", snapshot->state);
return RESULT_SUCCESS;
}
/* if we get this far no channel name matched the argument given */
diff --git a/res/res_ari_model.c b/res/res_ari_model.c
index 7736ef52f..3c8dd4f2b 100644
--- a/res/res_ari_model.c
+++ b/res/res_ari_model.c
@@ -177,7 +177,7 @@ int ast_ari_validate_list(struct ast_json *json, int (*fn)(struct ast_json *))
member_res = fn(ast_json_array_get(json, i));
if (!member_res) {
ast_log(LOG_ERROR,
- "Array member %zd failed validation\n", i);
+ "Array member %zu failed validation\n", i);
res = 0;
}
}
diff --git a/res/res_calendar.c b/res/res_calendar.c
index e6c93fdc7..ae52cbfce 100644
--- a/res/res_calendar.c
+++ b/res/res_calendar.c
@@ -697,7 +697,7 @@ static void *event_notification_duplicate(void *data)
/*! \brief Generate 32 byte random string (stolen from chan_sip.c)*/
static char *generate_random_string(char *buf, size_t size)
{
- long val[4];
+ unsigned long val[4];
int x;
for (x = 0; x < 4; x++) {
@@ -1368,7 +1368,7 @@ static int calendar_query_result_exec(struct ast_channel *chan, const char *cmd,
} else if (!strcasecmp(args.field, "end")) {
snprintf(buf, len, "%ld", (long) entry->event->end);
} else if (!strcasecmp(args.field, "busystate")) {
- snprintf(buf, len, "%d", entry->event->busy_state);
+ snprintf(buf, len, "%u", entry->event->busy_state);
} else if (!strcasecmp(args.field, "attendees")) {
calendar_join_attendees(entry->event, buf, len);
} else {
@@ -1429,7 +1429,7 @@ static int calendar_write_exec(struct ast_channel *chan, const char *cmd, char *
}
if (fields.argc - 1 != values.argc) {
- ast_log(LOG_WARNING, "CALENDAR_WRITE should have the same number of fields (%d) and values (%d)!\n", fields.argc - 1, values.argc);
+ ast_log(LOG_WARNING, "CALENDAR_WRITE should have the same number of fields (%u) and values (%u)!\n", fields.argc - 1, values.argc);
goto write_cleanup;
}
@@ -1729,7 +1729,7 @@ static int calendar_event_read(struct ast_channel *chan, const char *cmd, char *
} else if (!strcasecmp(data, "end")) {
snprintf(buf, len, "%ld", (long)event->end);
} else if (!strcasecmp(data, "busystate")) {
- snprintf(buf, len, "%d", event->busy_state);
+ snprintf(buf, len, "%u", event->busy_state);
} else if (!strcasecmp(data, "attendees")) {
calendar_join_attendees(event, buf, len);
}
diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c
index 0bf3e63cc..d9dde31c2 100644
--- a/res/res_calendar_caldav.c
+++ b/res/res_calendar_caldav.c
@@ -202,7 +202,10 @@ static int caldav_write_event(struct ast_calendar_event *event)
for (x = 0; x < 8; x++) {
val[x] = ast_random();
}
- ast_string_field_build(event, uid, "%04x%04x-%04x-%04x-%04x-%04x%04x%04x", val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]);
+ ast_string_field_build(event, uid, "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ (unsigned)val[0], (unsigned)val[1], (unsigned)val[2],
+ (unsigned)val[3], (unsigned)val[4], (unsigned)val[5],
+ (unsigned)val[6], (unsigned)val[7]);
}
calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
@@ -401,7 +404,7 @@ static void caldav_add_event(icalcomponent *comp, struct icaltime_span *span, vo
ast_string_field_set(event, uid, event->summary);
} else {
char tmp[100];
- snprintf(tmp, sizeof(tmp), "%lu", event->start);
+ snprintf(tmp, sizeof(tmp), "%ld", event->start);
ast_string_field_set(event, uid, tmp);
}
}
diff --git a/res/res_calendar_ews.c b/res/res_calendar_ews.c
index c6d827fe8..fe8c8a7bb 100644
--- a/res/res_calendar_ews.c
+++ b/res/res_calendar_ews.c
@@ -457,7 +457,7 @@ static int endelm(void *userdata, int state, const char *nspace, const char *nam
}
} else if (!strcmp(name, "Envelope")) {
/* Events end */
- ast_debug(3, "EWS: XML: %d of %d event(s) has been parsed…\n", ao2_container_count(ctx->pvt->events), ctx->pvt->items);
+ ast_debug(3, "EWS: XML: %d of %u event(s) has been parsed…\n", ao2_container_count(ctx->pvt->events), ctx->pvt->items);
if (ao2_container_count(ctx->pvt->events) >= ctx->pvt->items) {
ast_debug(3, "EWS: XML: All events has been parsed, merging…\n");
ast_calendar_merge_events(ctx->pvt->owner, ctx->pvt->events);
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c
index 84b4e6845..ef2d9173d 100644
--- a/res/res_calendar_icalendar.c
+++ b/res/res_calendar_icalendar.c
@@ -246,7 +246,7 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span,
ast_string_field_set(event, uid, event->summary);
} else {
char tmp[100];
- snprintf(tmp, sizeof(tmp), "%lu", event->start);
+ snprintf(tmp, sizeof(tmp), "%ld", event->start);
ast_string_field_set(event, uid, tmp);
}
}
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 585c75147..291c33590 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -83,7 +83,7 @@ static void decode_chunk(char *chunk)
{
for (; *chunk; chunk++) {
if (*chunk == '^' && strchr("0123456789ABCDEF", chunk[1]) && strchr("0123456789ABCDEF", chunk[2])) {
- sscanf(chunk + 1, "%02hhX", chunk);
+ sscanf(chunk + 1, "%02hhX", (unsigned char *)chunk);
memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1);
}
}
@@ -109,7 +109,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
return NULL;
}
- ast_debug(1, "Skip: %lld; SQL: %s\n", cps->skip, cps->sql);
+ ast_debug(1, "Skip: %llu; SQL: %s\n", cps->skip, cps->sql);
res = SQLPrepare(stmt, (unsigned char *)cps->sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@@ -122,7 +122,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
const char *newval = field->value;
if ((1LL << count++) & cps->skip) {
- ast_debug(1, "Skipping field '%s'='%s' (%llo/%llo)\n", field->name, newval, 1LL << (count - 1), cps->skip);
+ ast_debug(1, "Skipping field '%s'='%s' (%llo/%llo)\n", field->name, newval, 1ULL << (count - 1), cps->skip);
continue;
}
ast_debug(1, "Parameter %d ('%s') = '%s'\n", x, field->name, newval);
diff --git a/res/res_corosync.c b/res/res_corosync.c
index fc15dc52d..ce4165498 100644
--- a/res/res_corosync.c
+++ b/res/res_corosync.c
@@ -231,13 +231,13 @@ static void *dispatch_thread_handler(void *data)
if (pfd[0].revents & POLLIN) {
if ((cs_err = cpg_dispatch(cpg_handle, CS_DISPATCH_ALL)) != CS_OK) {
- ast_log(LOG_WARNING, "Failed CPG dispatch: %d\n", cs_err);
+ ast_log(LOG_WARNING, "Failed CPG dispatch: %u\n", cs_err);
}
}
if (pfd[1].revents & POLLIN) {
if ((cs_err = corosync_cfg_dispatch(cfg_handle, CS_DISPATCH_ALL)) != CS_OK) {
- ast_log(LOG_WARNING, "Failed CFG dispatch: %d\n", cs_err);
+ ast_log(LOG_WARNING, "Failed CFG dispatch: %u\n", cs_err);
}
}
@@ -314,7 +314,7 @@ static void ast_event_cb(const struct ast_event *event, void *data)
* these events, so just send away. */
if ((cs_err = cpg_mcast_joined(cpg_handle, CPG_TYPE_FIFO, &iov, 1)) != CS_OK) {
- ast_log(LOG_WARNING, "CPG mcast failed (%d)\n", cs_err);
+ ast_log(LOG_WARNING, "CPG mcast failed (%u)\n", cs_err);
}
}
@@ -368,7 +368,7 @@ static char *corosync_show_members(struct ast_cli_entry *e, int cmd, struct ast_
continue;
}
- ast_cli(a->fd, "=== Node %d\n", i);
+ ast_cli(a->fd, "=== Node %u\n", i);
ast_cli(a->fd, "=== --> Group: %s\n", cpg_desc.group.value);
for (j = 0; j < num_addrs; j++) {
@@ -378,7 +378,7 @@ static char *corosync_show_members(struct ast_cli_entry *e, int cmd, struct ast_
getnameinfo(sa, sa_len, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST);
- ast_cli(a->fd, "=== --> Address %d: %s\n", j + 1, buf);
+ ast_cli(a->fd, "=== --> Address %u: %s\n", j + 1, buf);
}
}
diff --git a/res/res_crypto.c b/res/res_crypto.c
index 30c51194a..22b82dc34 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -532,7 +532,7 @@ static void md52sum(char *sum, unsigned char *md5)
{
int x;
for (x = 0; x < 16; x++) {
- sum += sprintf(sum, "%02x", *(md5++));
+ sum += sprintf(sum, "%02x", (unsigned)*(md5++));
}
}
diff --git a/res/res_fax.c b/res/res_fax.c
index 4f253b758..54fc9f1ef 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -407,7 +407,7 @@ static void debug_check_frame_for_silence(struct ast_fax_session *s, unsigned in
history->consec_ms = 0;
if ((last_consec_frames != 0)) {
- ast_verb(6, "Channel '%s' fax session '%d', [ %.3ld.%.6ld ], %s sent %d frames (%d ms) of %s.\n",
+ ast_verb(6, "Channel '%s' fax session '%u', [ %.3ld.%.6ld ], %s sent %u frames (%u ms) of %s.\n",
s->channame, s->id, (long) diff.tv_sec, (long int) diff.tv_usec,
(c2s) ? "channel" : "stack", last_consec_frames, last_consec_ms,
(wassil) ? "silence" : "energy");
@@ -807,7 +807,7 @@ const char *ast_fax_state_to_str(enum ast_fax_state state)
case AST_FAX_STATE_INACTIVE:
return "Inactive";
default:
- ast_log(LOG_WARNING, "unhandled FAX state: %d\n", state);
+ ast_log(LOG_WARNING, "unhandled FAX state: %u\n", state);
return "Unknown";
}
}
@@ -1081,11 +1081,11 @@ static struct ast_fax_session *fax_session_new(struct ast_fax_session_details *d
}
/* link the session to the session container */
if (!(ao2_link(faxregistry.container, s))) {
- ast_log(LOG_ERROR, "failed to add FAX session '%d' to container.\n", s->id);
+ ast_log(LOG_ERROR, "failed to add FAX session '%u' to container.\n", s->id);
ao2_ref(s, -1);
return NULL;
}
- ast_debug(4, "channel '%s' using FAX session '%d'\n", s->channame, s->id);
+ ast_debug(4, "channel '%s' using FAX session '%u'\n", s->channame, s->id);
return s;
}
@@ -1221,7 +1221,7 @@ static void set_channel_variables(struct ast_channel *chan, struct ast_fax_sessi
pbx_builtin_setvar_helper(chan, "FAXBITRATE", S_OR(details->transfer_rate, NULL));
pbx_builtin_setvar_helper(chan, "FAXRESOLUTION", S_OR(details->resolution, NULL));
- snprintf(buf, sizeof(buf), "%d", details->pages_transferred);
+ snprintf(buf, sizeof(buf), "%u", details->pages_transferred);
pbx_builtin_setvar_helper(chan, "FAXPAGES", buf);
}
@@ -1243,7 +1243,7 @@ static void set_channel_variables(struct ast_channel *chan, struct ast_fax_sessi
#define GENERIC_FAX_EXEC_ERROR(fax, chan, errorstr, reason) \
do { \
- ast_log(LOG_ERROR, "channel '%s' FAX session '%d' failure, reason: '%s' (%s)\n", ast_channel_name(chan), fax->id, reason, errorstr); \
+ ast_log(LOG_ERROR, "channel '%s' FAX session '%u' failure, reason: '%s' (%s)\n", ast_channel_name(chan), fax->id, reason, errorstr); \
GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason); \
} while (0)
@@ -1416,7 +1416,7 @@ static int generic_fax_exec(struct ast_channel *chan, struct ast_fax_session_det
fax->smoother = NULL;
}
if (!(fax->smoother = ast_smoother_new(320))) {
- ast_log(LOG_WARNING, "Channel '%s' FAX session '%d' failed to obtain a smoother.\n", ast_channel_name(chan), fax->id);
+ ast_log(LOG_WARNING, "Channel '%s' FAX session '%u' failed to obtain a smoother.\n", ast_channel_name(chan), fax->id);
}
} else {
expected_frametype = AST_FRAME_MODEM;
@@ -1504,7 +1504,7 @@ static int generic_fax_exec(struct ast_channel *chan, struct ast_fax_session_det
report_fax_status(chan, details, "T.38 Negotiated");
- ast_verb(3, "Channel '%s' switched to T.38 FAX session '%d'.\n", ast_channel_name(chan), fax->id);
+ ast_verb(3, "Channel '%s' switched to T.38 FAX session '%u'.\n", ast_channel_name(chan), fax->id);
}
} else if ((frame->frametype == expected_frametype) &&
(!memcmp(&frame->subclass, &expected_framesubclass, sizeof(frame->subclass)))) {
@@ -1876,13 +1876,13 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "maxrate is less than minrate");
set_channel_variables(chan, details);
- ast_log(LOG_ERROR, "maxrate %d is less than minrate %d\n", details->maxrate, details->minrate);
+ ast_log(LOG_ERROR, "maxrate %u is less than minrate %u\n", details->maxrate, details->minrate);
return -1;
}
if (check_modem_rate(details->modems, details->minrate)) {
ast_fax_modem_to_str(details->modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %d\n", modems, details->minrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, details->minrate);
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "incompatible 'modems' and 'minrate' settings");
set_channel_variables(chan, details);
@@ -1891,7 +1891,7 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
if (check_modem_rate(details->modems, details->maxrate)) {
ast_fax_modem_to_str(details->modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %d\n", modems, details->maxrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, details->maxrate);
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "incompatible 'modems' and 'maxrate' settings");
set_channel_variables(chan, details);
@@ -2383,13 +2383,13 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "maxrate is less than minrate");
set_channel_variables(chan, details);
- ast_log(LOG_ERROR, "maxrate %d is less than minrate %d\n", details->maxrate, details->minrate);
+ ast_log(LOG_ERROR, "maxrate %u is less than minrate %u\n", details->maxrate, details->minrate);
return -1;
}
if (check_modem_rate(details->modems, details->minrate)) {
ast_fax_modem_to_str(details->modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %d\n", modems, details->minrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, details->minrate);
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "incompatible 'modems' and 'minrate' settings");
set_channel_variables(chan, details);
@@ -2398,7 +2398,7 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
if (check_modem_rate(details->modems, details->maxrate)) {
ast_fax_modem_to_str(details->modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %d\n", modems, details->maxrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, details->maxrate);
ast_string_field_set(details, error, "INVALID_ARGUMENTS");
ast_string_field_set(details, resultstr, "incompatible 'modems' and 'maxrate' settings");
set_channel_variables(chan, details);
@@ -3175,7 +3175,7 @@ static struct ast_frame *fax_gateway_framehook(struct ast_channel *chan, struct
active = chan;
break;
default:
- ast_log(LOG_WARNING, "unhandled framehook event %i\n", event);
+ ast_log(LOG_WARNING, "unhandled framehook event %u\n", event);
return f;
}
@@ -3560,7 +3560,7 @@ static char *fax_session_tab_complete(struct ast_cli_args *a)
tklen = strlen(a->word);
i = ao2_iterator_init(faxregistry.container, 0);
while ((s = ao2_iterator_next(&i))) {
- snprintf(tbuf, sizeof(tbuf), "%d", s->id);
+ snprintf(tbuf, sizeof(tbuf), "%u", s->id);
if (!strncasecmp(a->word, tbuf, tklen) && ++wordnum > a->n) {
name = ast_strdup(tbuf);
ao2_ref(s, -1);
@@ -3663,7 +3663,7 @@ static char *cli_fax_show_capabilities(struct ast_cli_entry *e, int cmd, struct
num_modules++;
}
AST_RWLIST_UNLOCK(&faxmodules);
- ast_cli(a->fd, "%d registered modules\n\n", num_modules);
+ ast_cli(a->fd, "%u registered modules\n\n", num_modules);
return CLI_SUCCESS;
}
@@ -3691,8 +3691,8 @@ static char *cli_fax_show_settings(struct ast_cli_entry *e, int cmd, struct ast_
ast_cli(a->fd, "FAX For Asterisk Settings:\n");
ast_cli(a->fd, "\tECM: %s\n", options.ecm ? "Enabled" : "Disabled");
ast_cli(a->fd, "\tStatus Events: %s\n", options.statusevents ? "On" : "Off");
- ast_cli(a->fd, "\tMinimum Bit Rate: %d\n", options.minrate);
- ast_cli(a->fd, "\tMaximum Bit Rate: %d\n", options.maxrate);
+ ast_cli(a->fd, "\tMinimum Bit Rate: %u\n", options.minrate);
+ ast_cli(a->fd, "\tMaximum Bit Rate: %u\n", options.maxrate);
ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
ast_cli(a->fd, "\tModem Modulations Allowed: %s\n", modems);
ast_cli(a->fd, "\n\nFAX Technology Modules:\n\n");
@@ -3726,7 +3726,7 @@ static char *cli_fax_show_session(struct ast_cli_entry *e, int cmd, struct ast_c
return CLI_SHOWUSAGE;
}
- if (sscanf(a->argv[3], "%d", &tmp.id) != 1) {
+ if (sscanf(a->argv[3], "%u", &tmp.id) != 1) {
ast_log(LOG_ERROR, "invalid session id: '%s'\n", a->argv[3]);
return RESULT_SUCCESS;
}
@@ -3833,7 +3833,7 @@ static char *cli_fax_show_sessions(struct ast_cli_entry *e, int cmd, struct ast_
filenames = generate_filenames_string(s->details, "", ", ");
- ast_cli(a->fd, "%-20.20s %-10.10s %-10d %-5.5s %-10.10s %-15.15s %-30s\n",
+ ast_cli(a->fd, "%-20.20s %-10.10s %-10u %-5.5s %-10.10s %-15.15s %-30s\n",
s->channame, s->tech->type, s->id,
cli_session_type(s),
cli_session_operation(s),
@@ -3947,21 +3947,21 @@ static int set_config(int reload)
}
if (options.maxrate < options.minrate) {
- ast_log(LOG_ERROR, "maxrate %d is less than minrate %d\n", options.maxrate, options.minrate);
+ ast_log(LOG_ERROR, "maxrate %u is less than minrate %u\n", options.maxrate, options.minrate);
res = -1;
goto end;
}
if (check_modem_rate(options.modems, options.minrate)) {
ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %d\n", modems, options.minrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, options.minrate);
res = -1;
goto end;
}
if (check_modem_rate(options.modems, options.maxrate)) {
ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
- ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %d\n", modems, options.maxrate);
+ ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, options.maxrate);
res = -1;
goto end;
}
@@ -4016,11 +4016,11 @@ static int acf_faxopt_read(struct ast_channel *chan, const char *cmd, char *data
} else if (!strcasecmp(data, "localstationid")) {
ast_copy_string(buf, details->localstationid, len);
} else if (!strcasecmp(data, "maxrate")) {
- snprintf(buf, len, "%d", details->maxrate);
+ snprintf(buf, len, "%u", details->maxrate);
} else if (!strcasecmp(data, "minrate")) {
- snprintf(buf, len, "%d", details->minrate);
+ snprintf(buf, len, "%u", details->minrate);
} else if (!strcasecmp(data, "pages")) {
- snprintf(buf, len, "%d", details->pages_transferred);
+ snprintf(buf, len, "%u", details->pages_transferred);
} else if (!strcasecmp(data, "rate")) {
ast_copy_string(buf, details->transfer_rate, len);
} else if (!strcasecmp(data, "remotestationid")) {
@@ -4028,7 +4028,7 @@ static int acf_faxopt_read(struct ast_channel *chan, const char *cmd, char *data
} else if (!strcasecmp(data, "resolution")) {
ast_copy_string(buf, details->resolution, len);
} else if (!strcasecmp(data, "sessionid")) {
- snprintf(buf, len, "%d", details->id);
+ snprintf(buf, len, "%u", details->id);
} else if (!strcasecmp(data, "status")) {
ast_copy_string(buf, details->result, len);
} else if (!strcasecmp(data, "statusstr")) {
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c
index 1ddf566ca..015e69704 100644
--- a/res/res_fax_spandsp.c
+++ b/res/res_fax_spandsp.c
@@ -362,7 +362,7 @@ static void t30_phase_e_handler(t30_state_t *t30_state, void *data, int completi
const char *c;
t30_stats_t stats;
- ast_debug(5, "FAX session '%d' entering phase E\n", s->id);
+ ast_debug(5, "FAX session '%u' entering phase E\n", s->id);
p->isdone = 1;
@@ -379,7 +379,7 @@ static void t30_phase_e_handler(t30_state_t *t30_state, void *data, int completi
ast_string_field_set(s->details, resultstr, t30_completion_code_to_str(completion_code));
- ast_debug(5, "FAX session '%d' completed with result: %s (%s)\n", s->id, s->details->result, s->details->resultstr);
+ ast_debug(5, "FAX session '%u' completed with result: %s (%s)\n", s->id, s->details->result, s->details->resultstr);
if ((c = t30_get_tx_ident(t30_state))) {
ast_string_field_set(s->details, localstationid, c);
@@ -537,7 +537,7 @@ static void *spandsp_fax_new(struct ast_fax_session *s, struct ast_fax_tech_toke
}
if (!(p->timer = ast_timer_open())) {
- ast_log(LOG_ERROR, "Channel '%s' FAX session '%d' failed to create timing source.\n", s->channame, s->id);
+ ast_log(LOG_ERROR, "Channel '%s' FAX session '%u' failed to create timing source.\n", s->channame, s->id);
goto e_free;
}
@@ -611,14 +611,14 @@ static struct ast_frame *spandsp_fax_read(struct ast_fax_session *s)
ast_format_set(&fax_frame.subclass.format, AST_FORMAT_SLINEAR, 0);
if (ast_timer_ack(p->timer, 1) < 0) {
- ast_log(LOG_ERROR, "Failed to acknowledge timer for FAX session '%d'\n", s->id);
+ ast_log(LOG_ERROR, "Failed to acknowledge timer for FAX session '%u'\n", s->id);
return NULL;
}
/* XXX do we need to lock here? */
if (p->isdone) {
s->state = AST_FAX_STATE_COMPLETE;
- ast_debug(5, "FAX session '%d' is complete.\n", s->id);
+ ast_debug(5, "FAX session '%u' is complete.\n", s->id);
return NULL;
}
@@ -661,7 +661,7 @@ static int spandsp_v21_detect(struct ast_fax_session *s, const struct ast_frame
return -1;
}
- ast_debug(5, "frame={ datalen=%d, samples=%d, mallocd=%d, src=%s, flags=%d, ts=%ld, len=%ld, seqno=%d, data.ptr=%p, subclass.format.id=%d }\n", f->datalen, f->samples, f->mallocd, f->src, f->flags, f->ts, f->len, f->seqno, f->data.ptr, f->subclass.format.id);
+ ast_debug(5, "frame={ datalen=%d, samples=%d, mallocd=%d, src=%s, flags=%u, ts=%ld, len=%ld, seqno=%d, data.ptr=%p, subclass.format.id=%u }\n", f->datalen, f->samples, f->mallocd, f->src, f->flags, f->ts, f->len, f->seqno, f->data.ptr, f->subclass.format.id);
/* slinear frame can be passed to spandsp */
if (f->subclass.format.id == AST_FORMAT_SLINEAR) {
@@ -684,7 +684,7 @@ static int spandsp_v21_detect(struct ast_fax_session *s, const struct ast_frame
/* frame in other formats cannot be passed to spandsp, it could cause segfault */
} else {
- ast_log(LOG_WARNING, "Unknown frame format %d, v.21 detection skipped\n", f->subclass.format.id);
+ ast_log(LOG_WARNING, "Unknown frame format %u, v.21 detection skipped\n", f->subclass.format.id);
return -1;
}
@@ -720,7 +720,7 @@ static int spandsp_fax_write(struct ast_fax_session *s, const struct ast_frame *
/* XXX do we need to lock here? */
if (s->state == AST_FAX_STATE_COMPLETE) {
- ast_log(LOG_WARNING, "FAX session '%d' is in the '%s' state.\n", s->id, ast_fax_state_to_str(s->state));
+ ast_log(LOG_WARNING, "FAX session '%u' is in the '%s' state.\n", s->id, ast_fax_state_to_str(s->state));
return -1;
}
@@ -964,7 +964,7 @@ static int spandsp_fax_start(struct ast_fax_session *s)
/* start the timer */
if (ast_timer_set_rate(p->timer, SPANDSP_FAX_TIMER_RATE)) {
- ast_log(LOG_ERROR, "FAX session '%d' error setting rate on timing source.\n", s->id);
+ ast_log(LOG_ERROR, "FAX session '%u' error setting rate on timing source.\n", s->id);
return -1;
}
@@ -1022,7 +1022,7 @@ static char *spandsp_fax_cli_show_session(struct ast_fax_session *s, int fd)
if (s->details->caps & AST_FAX_TECH_GATEWAY) {
struct spandsp_pvt *p = s->tech_pvt;
- ast_cli(fd, "%-22s : %d\n", "session", s->id);
+ ast_cli(fd, "%-22s : %u\n", "session", s->id);
ast_cli(fd, "%-22s : %s\n", "operation", "Gateway");
ast_cli(fd, "%-22s : %s\n", "state", ast_fax_state_to_str(s->state));
if (s->state != AST_FAX_STATE_UNINITIALIZED) {
@@ -1033,13 +1033,13 @@ static char *spandsp_fax_cli_show_session(struct ast_fax_session *s, int fd)
ast_cli(fd, "%-22s : %d\n", "Page Number", stats.pages_transferred + 1);
}
} else if (s->details->caps & AST_FAX_TECH_V21_DETECT) {
- ast_cli(fd, "%-22s : %d\n", "session", s->id);
+ ast_cli(fd, "%-22s : %u\n", "session", s->id);
ast_cli(fd, "%-22s : %s\n", "operation", "V.21 Detect");
ast_cli(fd, "%-22s : %s\n", "state", ast_fax_state_to_str(s->state));
} else {
struct spandsp_pvt *p = s->tech_pvt;
- ast_cli(fd, "%-22s : %d\n", "session", s->id);
+ ast_cli(fd, "%-22s : %u\n", "session", s->id);
ast_cli(fd, "%-22s : %s\n", "operation", (s->details->caps & AST_FAX_TECH_RECEIVE) ? "Receive" : "Transmit");
ast_cli(fd, "%-22s : %s\n", "state", ast_fax_state_to_str(s->state));
if (s->state != AST_FAX_STATE_UNINITIALIZED) {
diff --git a/res/res_format_attr_celt.c b/res/res_format_attr_celt.c
index aea3eb482..1249f0472 100644
--- a/res/res_format_attr_celt.c
+++ b/res/res_format_attr_celt.c
@@ -65,7 +65,7 @@ static void celt_sdp_generate(const struct ast_format_attr *format_attr, unsigne
return;
}
- ast_str_append(str, 0, "a=fmtp:%d framesize=%d\r\n", payload, attr->framesize);
+ ast_str_append(str, 0, "a=fmtp:%u framesize=%u\r\n", payload, attr->framesize);
}
static enum ast_format_cmp_res celt_cmp(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)
@@ -127,7 +127,7 @@ static int celt_isset(const struct ast_format_attr *fattr, va_list ap)
}
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
return -1;
}
}
@@ -172,7 +172,7 @@ static void celt_set(struct ast_format_attr *fattr, va_list ap)
attr->framesize = (va_arg(ap, int));
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
}
}
}
diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c
index 2ca39a927..8ec28aac9 100644
--- a/res/res_format_attr_h263.c
+++ b/res/res_format_attr_h263.c
@@ -193,7 +193,7 @@ static void h263_format_attr_sdp_generate(const struct ast_format_attr *format_a
}
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d CUSTOM=%u,%u,%u", payload, format_attr->format_attr[H263_ATTR_KEY_CUSTOM_XMAX],
+ ast_str_append(str, 0, "a=fmtp:%u CUSTOM=%u,%u,%u", payload, format_attr->format_attr[H263_ATTR_KEY_CUSTOM_XMAX],
format_attr->format_attr[H263_ATTR_KEY_CUSTOM_YMAX], format_attr->format_attr[H263_ATTR_KEY_CUSTOM_MPI]);
added = 1;
} else {
@@ -206,7 +206,7 @@ static void h263_format_attr_sdp_generate(const struct ast_format_attr *format_a
}
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d PAR=%u:%u", payload, format_attr->format_attr[H263_ATTR_KEY_PAR_WIDTH],
+ ast_str_append(str, 0, "a=fmtp:%u PAR=%u:%u", payload, format_attr->format_attr[H263_ATTR_KEY_PAR_WIDTH],
format_attr->format_attr[H263_ATTR_KEY_PAR_HEIGHT]);
added = 1;
} else {
@@ -219,7 +219,7 @@ static void h263_format_attr_sdp_generate(const struct ast_format_attr *format_a
}
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d P=%u", payload, format_attr->format_attr[H263_ATTR_KEY_P_SUB1]);
+ ast_str_append(str, 0, "a=fmtp:%u P=%u", payload, format_attr->format_attr[H263_ATTR_KEY_P_SUB1]);
added = 1;
} else {
ast_str_append(str, 0, ";P=%u", format_attr->format_attr[H263_ATTR_KEY_P_SUB1]);
@@ -237,7 +237,7 @@ static void h263_format_attr_sdp_generate(const struct ast_format_attr *format_a
} else if ((name = h263_attr_key_to_str(i, format_attr))) {
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d %s=%u", payload, name, format_attr->format_attr[i]);
+ ast_str_append(str, 0, "a=fmtp:%u %s=%u", payload, name, format_attr->format_attr[i]);
added = 1;
} else {
ast_str_append(str, 0, ";%s=%u", name, format_attr->format_attr[i]);
diff --git a/res/res_format_attr_h264.c b/res/res_format_attr_h264.c
index eae1aa36e..5ecde3f3f 100644
--- a/res/res_format_attr_h264.c
+++ b/res/res_format_attr_h264.c
@@ -260,7 +260,7 @@ static void h264_format_attr_sdp_generate(const struct ast_format_attr *format_a
ast_base64encode(pps, ppsdecoded, format_attr->format_attr[H264_ATTR_KEY_PPS_LEN], H264_MAX_SPS_PPS_SIZE);
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d sprop-parameter-sets=%s,%s", payload, sps, pps);
+ ast_str_append(str, 0, "a=fmtp:%u sprop-parameter-sets=%s,%s", payload, sps, pps);
added = 1;
} else {
ast_str_append(str, 0, ";sprop-parameter-sets=%s,%s", sps, pps);
@@ -268,7 +268,7 @@ static void h264_format_attr_sdp_generate(const struct ast_format_attr *format_a
} else if (i == H264_ATTR_KEY_PROFILE_IDC && format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC] &&
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP] && format_attr->format_attr[H264_ATTR_KEY_LEVEL]) {
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d profile-level-id=%X%X%X", payload, format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
+ ast_str_append(str, 0, "a=fmtp:%u profile-level-id=%X%X%X", payload, format_attr->format_attr[H264_ATTR_KEY_PROFILE_IDC],
format_attr->format_attr[H264_ATTR_KEY_PROFILE_IOP], format_attr->format_attr[H264_ATTR_KEY_LEVEL]);
added = 1;
} else {
@@ -277,7 +277,7 @@ static void h264_format_attr_sdp_generate(const struct ast_format_attr *format_a
}
} else if ((name = h264_attr_key_to_str(i)) && h264_attr_key_addable(format_attr, i)) {
if (!added) {
- ast_str_append(str, 0, "a=fmtp:%d %s=%u", payload, name, format_attr->format_attr[i]);
+ ast_str_append(str, 0, "a=fmtp:%u %s=%u", payload, name, format_attr->format_attr[i]);
added = 1;
} else {
ast_str_append(str, 0, ";%s=%u", name, format_attr->format_attr[i]);
diff --git a/res/res_format_attr_opus.c b/res/res_format_attr_opus.c
index ed8adb77f..3fa7dcef3 100644
--- a/res/res_format_attr_opus.c
+++ b/res/res_format_attr_opus.c
@@ -97,11 +97,11 @@ static void opus_sdp_generate(const struct ast_format_attr *format_attr, unsigne
/* FIXME should we only generate attributes that were explicitly set? */
ast_str_append(str, 0,
- "a=fmtp:%d "
- "maxplaybackrate=%d;"
- "sprop-maxcapturerate=%d;"
- "minptime=%d;"
- "maxaveragebitrate=%d;"
+ "a=fmtp:%u "
+ "maxplaybackrate=%u;"
+ "sprop-maxcapturerate=%u;"
+ "minptime=%u;"
+ "maxaveragebitrate=%u;"
"stereo=%d;"
"sprop-stereo=%d;"
"cbr=%d;"
@@ -216,7 +216,7 @@ static int opus_isset(const struct ast_format_attr *fattr, va_list ap)
}
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
return -1;
}
}
@@ -284,7 +284,7 @@ static void opus_set(struct ast_format_attr *fattr, va_list ap)
attr->spropstereo = (va_arg(ap, int));
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
}
}
}
diff --git a/res/res_format_attr_silk.c b/res/res_format_attr_silk.c
index 7d4fa5bf8..075570fb5 100644
--- a/res/res_format_attr_silk.c
+++ b/res/res_format_attr_silk.c
@@ -70,11 +70,11 @@ static void silk_sdp_generate(const struct ast_format_attr *format_attr, unsigne
struct silk_attr *attr = (struct silk_attr *) format_attr;
if ((attr->maxbitrate > 5000) && (attr->maxbitrate < 40000)) {
- ast_str_append(str, 0, "a=fmtp:%d maxaveragebitrate=%d\r\n", payload, attr->maxbitrate);
+ ast_str_append(str, 0, "a=fmtp:%u maxaveragebitrate=%u\r\n", payload, attr->maxbitrate);
}
- ast_str_append(str, 0, "a=fmtp:%d usedtx=%d\r\n", payload, attr->dtx);
- ast_str_append(str, 0, "a=fmtp:%d useinbandfec=%d\r\n", payload, attr->fec);
+ ast_str_append(str, 0, "a=fmtp:%u usedtx=%u\r\n", payload, attr->dtx);
+ ast_str_append(str, 0, "a=fmtp:%u useinbandfec=%u\r\n", payload, attr->fec);
}
static enum ast_format_cmp_res silk_cmp(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)
@@ -152,7 +152,7 @@ static int silk_isset(const struct ast_format_attr *fattr, va_list ap)
}
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
return -1;
}
}
@@ -213,7 +213,7 @@ static void silk_set(struct ast_format_attr *fattr, va_list ap)
attr->packetloss_percentage = (va_arg(ap, int));
break;
default:
- ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
}
}
}
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
index d344340c7..cdb639f48 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -483,7 +483,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_read)(struct ast_websocket *session, cha
*payload = &buf[frame_size]; /* payload will start here, at the end of the options, if any */
frame_size = frame_size + (*payload_len); /* final frame size is header + optional headers + payload data */
if (frame_size > MAXIMUM_FRAME_SIZE) {
- ast_log(LOG_WARNING, "Cannot fit huge websocket frame of %zd bytes\n", frame_size);
+ ast_log(LOG_WARNING, "Cannot fit huge websocket frame of %zu bytes\n", frame_size);
/* The frame won't fit :-( */
ast_websocket_close(session, 1009);
return -1;
@@ -502,7 +502,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_read)(struct ast_websocket *session, cha
}
if (!(new_payload = ast_realloc(session->payload, (session->payload_len + *payload_len)))) {
- ast_log(LOG_WARNING, "Failed allocation: %p, %zd, %"PRIu64"\n",
+ ast_log(LOG_WARNING, "Failed allocation: %p, %zu, %"PRIu64"\n",
session->payload, session->payload_len, *payload_len);
*payload_len = 0;
ast_websocket_close(session, 1009);
@@ -554,7 +554,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_read)(struct ast_websocket *session, cha
session->closing = 1;
} else {
- ast_log(LOG_WARNING, "WebSocket unknown opcode %d\n", *opcode);
+ ast_log(LOG_WARNING, "WebSocket unknown opcode %u\n", *opcode);
/* We received an opcode that we don't understand, the RFC states that 1003 is for a type of data that can't be accepted... opcodes
* fit that, I think. */
ast_websocket_close(session, 1003);
@@ -799,7 +799,7 @@ static void websocket_echo_callback(struct ast_websocket *session, struct ast_va
} else if (opcode == AST_WEBSOCKET_OPCODE_CLOSE) {
break;
} else {
- ast_debug(1, "Ignored WebSocket opcode %d\n", opcode);
+ ast_debug(1, "Ignored WebSocket opcode %u\n", opcode);
}
}
diff --git a/res/res_jabber.c b/res/res_jabber.c
index ede498124..dbc6135f3 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -1811,7 +1811,7 @@ static int aji_act_hook(void *data, int type, iks *node)
aji_handle_iq(client, node);
break;
default:
- ast_debug(1, "JABBER: I don't know anything about paktype '%d'\n", pak->type);
+ ast_debug(1, "JABBER: I don't know anything about paktype '%u'\n", pak->type);
break;
}
@@ -2539,35 +2539,35 @@ static void aji_handle_presence(struct aji_client *client, ikspak *pak)
}
switch (pak->subtype) {
case IKS_TYPE_AVAILABLE:
- ast_debug(3, "JABBER: I am available ^_* %i\n", pak->subtype);
+ ast_debug(3, "JABBER: I am available ^_* %u\n", pak->subtype);
break;
case IKS_TYPE_UNAVAILABLE:
- ast_debug(3, "JABBER: I am unavailable ^_* %i\n", pak->subtype);
+ ast_debug(3, "JABBER: I am unavailable ^_* %u\n", pak->subtype);
break;
default:
- ast_debug(3, "JABBER: Ohh sexy and the wrong type: %i\n", pak->subtype);
+ ast_debug(3, "JABBER: Ohh sexy and the wrong type: %u\n", pak->subtype);
}
switch (pak->show) {
case IKS_SHOW_UNAVAILABLE:
- ast_debug(3, "JABBER: type: %i subtype %i\n", pak->subtype, pak->show);
+ ast_debug(3, "JABBER: type: %u subtype %u\n", pak->subtype, pak->show);
break;
case IKS_SHOW_AVAILABLE:
ast_debug(3, "JABBER: type is available\n");
break;
case IKS_SHOW_CHAT:
- ast_debug(3, "JABBER: type: %i subtype %i\n", pak->subtype, pak->show);
+ ast_debug(3, "JABBER: type: %u subtype %u\n", pak->subtype, pak->show);
break;
case IKS_SHOW_AWAY:
ast_debug(3, "JABBER: type is away\n");
break;
case IKS_SHOW_XA:
- ast_debug(3, "JABBER: type: %i subtype %i\n", pak->subtype, pak->show);
+ ast_debug(3, "JABBER: type: %u subtype %u\n", pak->subtype, pak->show);
break;
case IKS_SHOW_DND:
- ast_debug(3, "JABBER: type: %i subtype %i\n", pak->subtype, pak->show);
+ ast_debug(3, "JABBER: type: %u subtype %u\n", pak->subtype, pak->show);
break;
default:
- ast_debug(3, "JABBER: Kinky! how did that happen %i\n", pak->show);
+ ast_debug(3, "JABBER: Kinky! how did that happen %u\n", pak->show);
}
if (found) {
@@ -2578,7 +2578,7 @@ static void aji_handle_presence(struct aji_client *client, ikspak *pak)
found->priority, S_OR(found->description, ""));
} else {
manager_event(EVENT_FLAG_USER, "JabberStatus",
- "Account: %s\r\nJID: %s\r\nStatus: %d\r\n",
+ "Account: %s\r\nJID: %s\r\nStatus: %u\r\n",
client->name, pak->from->partial, pak->show ? pak->show : IKS_SHOW_UNAVAILABLE);
}
}
@@ -3344,7 +3344,7 @@ static int aji_handle_pubsub_event(void *data, ikspak *pak)
}
if (!strcasecmp(iks_name(item_content), "state")) {
if ((cachable_str = iks_find_attrib(item_content, "cachable"))) {
- sscanf(cachable_str, "%30d", &cachable);
+ sscanf(cachable_str, "%30u", &cachable);
}
device_state = iks_find_cdata(item, "state");
ast_publish_device_state_full(item_id,
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 8181b867f..b94a7b5ee 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -340,9 +340,9 @@ int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const cha
}
} else {
ast_mutex_lock(&monitorlock);
- snprintf(monitor->read_filename, FILENAME_MAX, "%s/audio-in-%ld",
+ snprintf(monitor->read_filename, FILENAME_MAX, "%s/audio-in-%lu",
ast_config_AST_MONITOR_DIR, seq);
- snprintf(monitor->write_filename, FILENAME_MAX, "%s/audio-out-%ld",
+ snprintf(monitor->write_filename, FILENAME_MAX, "%s/audio-out-%lu",
ast_config_AST_MONITOR_DIR, seq);
seq++;
ast_mutex_unlock(&monitorlock);
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index d95b2fd12..970b7db1a 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -239,7 +239,7 @@ static int reload(void);
#define mohclass_ref(class,string) (ao2_t_ref((class), +1, (string)), class)
#ifndef REF_DEBUG
-#define mohclass_unref(class,string) (ao2_t_ref((class), -1, (string)), (struct mohclass *) NULL)
+#define mohclass_unref(class,string) ({ ao2_t_ref((class), -1, (string)); (struct mohclass *) NULL; })
#else
#define mohclass_unref(class,string) _mohclass_unref(class, string, __FILE__,__LINE__,__PRETTY_FUNCTION__)
static struct mohclass *_mohclass_unref(struct mohclass *class, const char *tag, const char *file, int line, const char *funcname)
diff --git a/res/res_odbc.c b/res/res_odbc.c
index bdbe8f2df..7b967d037 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -990,7 +990,7 @@ static char *handle_cli_odbc_show(struct ast_cli_entry *e, int cmd, struct ast_c
if (class->haspool) {
struct ao2_iterator aoi2 = ao2_iterator_init(class->obj_container, 0);
- ast_cli(a->fd, " Pooled: Yes\n Limit: %d\n Connections in use: %d\n", class->limit, class->count);
+ ast_cli(a->fd, " Pooled: Yes\n Limit: %u\n Connections in use: %d\n", class->limit, class->count);
while ((current = ao2_iterator_next(&aoi2))) {
ao2_lock(current);
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index ce57ab6de..22581ca52 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -519,7 +519,7 @@ static int transport_tos_handler(const struct aco_option *opt, struct ast_variab
value = value << 2;
ast_log(LOG_WARNING,
"transport '%s' - 'tos' value '%s' uses bits that are "
- "discarded when converted to DSCP. Using equivalent %d instead.\n",
+ "discarded when converted to DSCP. Using equivalent %u instead.\n",
ast_sorcery_object_get_id(transport), var->value, value);
}
@@ -531,7 +531,7 @@ static int tos_to_str(const void *obj, const intptr_t *args, char **buf)
{
const struct ast_sip_transport *transport = obj;
- if (ast_asprintf(buf, "%d", transport->tos) == -1) {
+ if (ast_asprintf(buf, "%u", transport->tos) == -1) {
return -1;
}
return 0;
@@ -605,7 +605,7 @@ static int cli_print_body(void *obj, void *arg, int flags)
pj_sockaddr_print(&transport->host, hoststr, sizeof(hoststr), 3);
- ast_str_append(&context->output_buffer, 0, "%*s: %-21s %6s %5d %5d %s\n",
+ ast_str_append(&context->output_buffer, 0, "%*s: %-21s %6s %5u %5u %s\n",
CLI_INDENT_TO_SPACES(context->indent_level), "Transport",
ast_sorcery_object_get_id(transport),
ARRAY_IN_BOUNDS(transport->type, transport_types) ? transport_types[transport->type] : "Unknown",
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index 146a02d59..b0a49cdf7 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -229,7 +229,7 @@ static int expiration_str2struct(const struct aco_option *opt, struct ast_variab
static int expiration_struct2str(const void *obj, const intptr_t *args, char **buf)
{
const struct ast_sip_contact *contact = obj;
- return (ast_asprintf(buf, "%lu", contact->expiration_time.tv_sec) < 0) ? -1 : 0;
+ return (ast_asprintf(buf, "%ld", contact->expiration_time.tv_sec) < 0) ? -1 : 0;
}
/*! \brief Helper function which validates a permanent contact */
@@ -765,7 +765,7 @@ static int cli_aor_print_body(void *obj, void *arg, int flags)
indent = CLI_INDENT_TO_SPACES(context->indent_level);
flexwidth = CLI_LAST_TABSTOP - indent - 12;
- ast_str_append(&context->output_buffer, 0, "%*s: %-*.*s %12d\n",
+ ast_str_append(&context->output_buffer, 0, "%*s: %-*.*s %12u\n",
indent,
"Aor",
flexwidth, flexwidth,
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index b8839ca3c..511b61393 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -670,7 +670,7 @@ static int dtlsrekey_to_str(const void *obj, const intptr_t *args, char **buf)
const struct ast_sip_endpoint *endpoint = obj;
return ast_asprintf(
- buf, "%d", endpoint->media.rtp.dtls_cfg.rekey) >=0 ? 0 : -1;
+ buf, "%u", endpoint->media.rtp.dtls_cfg.rekey) >=0 ? 0 : -1;
}
static int dtlscertfile_to_str(const void *obj, const intptr_t *args, char **buf)
@@ -787,7 +787,7 @@ static int tos_audio_to_str(const void *obj, const intptr_t *args, char **buf)
{
const struct ast_sip_endpoint *endpoint = obj;
- if (ast_asprintf(buf, "%d", endpoint->media.tos_audio) == -1) {
+ if (ast_asprintf(buf, "%u", endpoint->media.tos_audio) == -1) {
return -1;
}
return 0;
@@ -797,7 +797,7 @@ static int tos_video_to_str(const void *obj, const intptr_t *args, char **buf)
{
const struct ast_sip_endpoint *endpoint = obj;
- if (ast_asprintf(buf, "%d", endpoint->media.tos_video) == -1) {
+ if (ast_asprintf(buf, "%u", endpoint->media.tos_video) == -1) {
return -1;
}
return 0;
diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index b35e27eb8..7002a13cd 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -278,7 +278,7 @@ static int handle_client_registration(void *data)
pjsip_regc_get_info(client_state->client, &info);
ast_copy_pj_str(server_uri, &info.server_uri, sizeof(server_uri));
ast_copy_pj_str(client_uri, &info.client_uri, sizeof(client_uri));
- ast_debug(3, "REGISTER attempt %d to '%s' with client '%s'\n",
+ ast_debug(3, "REGISTER attempt %u to '%s' with client '%s'\n",
client_state->retries + 1, server_uri, client_uri);
if (client_state->support_path) {
@@ -427,11 +427,11 @@ static void schedule_retry(struct registration_response *response, unsigned int
if (response->rdata) {
ast_log(LOG_WARNING, "Temporal response '%d' received from '%s' on "
- "registration attempt to '%s', retrying in '%d'\n",
+ "registration attempt to '%s', retrying in '%u'\n",
response->code, server_uri, client_uri, interval);
} else {
ast_log(LOG_WARNING, "No response received from '%s' on "
- "registration attempt to '%s', retrying in '%d'\n",
+ "registration attempt to '%s', retrying in '%u'\n",
server_uri, client_uri, interval);
}
}
@@ -492,7 +492,7 @@ static int handle_registration_response(void *data)
response->client_state->status = SIP_REGISTRATION_REJECTED_TEMPORARY;
response->client_state->retries++;
schedule_registration(response->client_state, response->client_state->forbidden_retry_interval);
- ast_log(LOG_WARNING, "403 Forbidden fatal response received from '%s' on registration attempt to '%s', retrying in '%d' seconds\n",
+ ast_log(LOG_WARNING, "403 Forbidden fatal response received from '%s' on registration attempt to '%s', retrying in '%u' seconds\n",
server_uri, client_uri, response->client_state->forbidden_retry_interval);
} else {
/* Finally if there's no hope of registering give up */
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index c8c75c694..93ed744cf 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -778,7 +778,7 @@ static pj_bool_t pubsub_on_rx_subscribe_request(pjsip_rx_data *rdata)
expires_header = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, rdata->msg_info.msg->hdr.next);
if (expires_header && expires_header->ivalue < endpoint->subscription.minexpiry) {
- ast_log(LOG_WARNING, "Subscription expiration %d is too brief for endpoint %s. Minimum is %d\n",
+ ast_log(LOG_WARNING, "Subscription expiration %d is too brief for endpoint %s. Minimum is %u\n",
expires_header->ivalue, ast_sorcery_object_get_id(endpoint), endpoint->subscription.minexpiry);
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 423, NULL, NULL, NULL);
return PJ_TRUE;
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index e6ec25f02..e5bec89c1 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -110,7 +110,7 @@ static int refer_progress_notify(void *data)
/* If the subscription has already been terminated we can't send a notification */
if (!(sub = notification->progress->sub)) {
- ast_debug(3, "Not sending NOTIFY of response '%d' and state '%d' on progress monitor '%p' as subscription has been terminated\n",
+ ast_debug(3, "Not sending NOTIFY of response '%d' and state '%u' on progress monitor '%p' as subscription has been terminated\n",
notification->response, notification->state, notification->progress);
return 0;
}
@@ -131,7 +131,7 @@ static int refer_progress_notify(void *data)
notification->progress->sub = NULL;
}
- ast_debug(3, "Sending NOTIFY with response '%d' and state '%d' on subscription '%p' and progress monitor '%p'\n",
+ ast_debug(3, "Sending NOTIFY with response '%d' and state '%u' on subscription '%p' and progress monitor '%p'\n",
notification->response, notification->state, sub, notification->progress);
/* Actually send the notification */
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index adfa40844..962895b60 100644
--- a/res/res_pjsip_registrar.c
+++ b/res/res_pjsip_registrar.c
@@ -452,7 +452,7 @@ static int rx_task(void *data)
/* Enforce the maximum number of contacts */
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), task_data->rdata, 403, NULL, NULL, NULL);
ast_sip_report_failed_acl(task_data->endpoint, task_data->rdata, "registrar_attempt_exceeds_maximum_configured_contacts");
- ast_log(LOG_WARNING, "Registration attempt from endpoint '%s' to AOR '%s' will exceed max contacts of %d\n",
+ ast_log(LOG_WARNING, "Registration attempt from endpoint '%s' to AOR '%s' will exceed max contacts of %u\n",
ast_sorcery_object_get_id(task_data->endpoint), ast_sorcery_object_get_id(task_data->aor), task_data->aor->max_contacts);
return PJ_TRUE;
}
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 0e3557b99..43f0832ac 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -348,7 +348,7 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se
for (; (candidate = ao2_iterator_next(&it_candidates)); ao2_ref(candidate, -1)) {
struct ast_str *attr_candidate = ast_str_create(128);
- ast_str_set(&attr_candidate, -1, "%s %d %s %d %s ", candidate->foundation, candidate->id, candidate->transport,
+ ast_str_set(&attr_candidate, -1, "%s %u %s %d %s ", candidate->foundation, candidate->id, candidate->transport,
candidate->priority, ast_sockaddr_stringify_host(&candidate->address));
ast_str_append(&attr_candidate, -1, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
@@ -409,7 +409,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
/* Find all of the candidates */
for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) {
char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
- int port, relay_port = 0;
+ unsigned int port, relay_port = 0;
struct ast_rtp_engine_ice_candidate candidate = { 0, };
attr = remote_stream->attr[attr_i];
@@ -422,7 +422,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value));
if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
- &candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {
+ (unsigned *)&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {
/* Candidate did not parse properly */
continue;
}
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 1bb36ca1d..5a6935250 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -131,7 +131,7 @@ static void t38_change_state(struct ast_sip_session *session, struct ast_sip_ses
}
session->t38state = new_state;
- ast_debug(2, "T.38 state changed to '%d' from '%d' on channel '%s'\n", new_state, old_state, ast_channel_name(session->channel));
+ ast_debug(2, "T.38 state changed to '%u' from '%u' on channel '%s'\n", new_state, old_state, ast_channel_name(session->channel));
if (pj_timer_heap_cancel(pjsip_endpt_get_timer_heap(ast_sip_get_pjsip_endpoint()), &state->timer)) {
ast_debug(2, "Automatic T.38 rejection on channel '%s' terminated\n", ast_channel_name(session->channel));
@@ -695,10 +695,10 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as
media->desc.port_count = 1;
media->desc.fmt[media->desc.fmt_count++] = STR_T38;
- snprintf(tmp, sizeof(tmp), "%d", state->our_parms.version);
+ snprintf(tmp, sizeof(tmp), "%u", state->our_parms.version);
media->attr[media->attr_count++] = pjmedia_sdp_attr_create(pool, "T38FaxVersion", pj_cstr(&stmp, tmp));
- snprintf(tmp, sizeof(tmp), "%d", t38_get_rate(state->our_parms.rate));
+ snprintf(tmp, sizeof(tmp), "%u", t38_get_rate(state->our_parms.rate));
media->attr[media->attr_count++] = pjmedia_sdp_attr_create(pool, "T38MaxBitRate", pj_cstr(&stmp, tmp));
if (state->our_parms.fill_bit_removal) {
@@ -722,7 +722,7 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as
break;
}
- snprintf(tmp, sizeof(tmp), "%d", ast_udptl_get_local_max_datagram(session_media->udptl));
+ snprintf(tmp, sizeof(tmp), "%u", ast_udptl_get_local_max_datagram(session_media->udptl));
media->attr[media->attr_count++] = pjmedia_sdp_attr_create(pool, "T38FaxMaxDatagram", pj_cstr(&stmp, tmp));
switch (ast_udptl_get_error_correction_scheme(session_media->udptl)) {
diff --git a/res/res_pktccops.c b/res/res_pktccops.c
index 80726f08b..747281952 100644
--- a/res/res_pktccops.c
+++ b/res/res_pktccops.c
@@ -397,7 +397,7 @@ static int cops_sendmsg (int sfd, struct copsmsg * sendmsg)
return -1;
}
- ast_debug(3, "COPS: sending opcode: %i len: %i\n", sendmsg->opcode, sendmsg->length);
+ ast_debug(3, "COPS: sending opcode: %i len: %u\n", sendmsg->opcode, sendmsg->length);
if (sendmsg->length < COPS_HEADER_SIZE) {
ast_log(LOG_WARNING, "COPS: invalid msg size!!!\n");
return -1;
@@ -418,7 +418,7 @@ static int cops_sendmsg (int sfd, struct copsmsg * sendmsg)
while(pobject != NULL) {
ast_debug(3, "COPS: Sending Object : cnum: %i ctype %i len: %i\n", pobject->cnum, pobject->ctype, pobject->length);
if (sendmsg->length < bufpos + pobject->length) {
- ast_log(LOG_WARNING, "COPS: Invalid msg size len: %i objectlen: %i\n", sendmsg->length, pobject->length);
+ ast_log(LOG_WARNING, "COPS: Invalid msg size len: %u objectlen: %i\n", sendmsg->length, pobject->length);
free(buf);
return -1;
}
@@ -426,7 +426,7 @@ static int cops_sendmsg (int sfd, struct copsmsg * sendmsg)
*(buf + bufpos + 2) = pobject->cnum;
*(buf + bufpos + 3) = pobject->ctype;
if (sendmsg->length < pobject->length + bufpos) {
- ast_log(LOG_WARNING, "COPS: Error sum of object len more the msg len %i < %i\n", sendmsg->length, pobject->length + bufpos);
+ ast_log(LOG_WARNING, "COPS: Error sum of object len more the msg len %u < %i\n", sendmsg->length, pobject->length + bufpos);
free(buf);
return -1;
}
@@ -726,7 +726,7 @@ static void *do_pktccops(void *data)
AST_LIST_TRAVERSE(&cmts_list, cmts, list) {
if (last_exec != time(NULL)) {
if (cmts->state == 2 && cmts->katimer + cmts->keepalive < time(NULL)) {
- ast_log(LOG_WARNING, "KA timer (%is) expired cmts: %s\n", cmts->keepalive, cmts->name);
+ ast_log(LOG_WARNING, "KA timer (%us) expired cmts: %s\n", cmts->keepalive, cmts->name);
cmts->state = 0;
cmts->katimer = -1;
close(cmts->sfd);
@@ -799,15 +799,16 @@ static void *do_pktccops(void *data)
if ((idx = ast_poll_fd_index(pfds, nfds, cmts->sfd)) > -1 && (pfds[idx].revents & POLLIN)) {
len = cops_getmsg(cmts->sfd, recmsg);
if (len > 0) {
- ast_debug(3, "COPS: got from %s:\n Header: versflag=0x%.2x opcode=%i clienttype=0x%.4x msglength=%i\n",
- cmts->name, recmsg->verflag, recmsg->opcode, recmsg->clienttype, recmsg->length);
+ ast_debug(3, "COPS: got from %s:\n Header: versflag=0x%.2x opcode=%i clienttype=0x%.4x msglength=%u\n",
+ cmts->name, (unsigned)recmsg->verflag,
+ recmsg->opcode, (unsigned)recmsg->clienttype, recmsg->length);
if (recmsg->object != NULL) {
pobject = recmsg->object;
while (pobject != NULL) {
ast_debug(3, " OBJECT: length=%i cnum=%i ctype=%i\n", pobject->length, pobject->cnum, pobject->ctype);
if (recmsg->opcode == 1 && pobject->cnum == 1 && pobject->ctype == 1 ) {
cmts->handle = ntohl(*((uint32_t *) pobject->contents));
- ast_debug(3, " REQ client handle: %i\n", cmts->handle);
+ ast_debug(3, " REQ client handle: %u\n", cmts->handle);
cmts->state = 2;
cmts->katimer = time(NULL);
} else if (pobject->cnum == 9 && pobject->ctype == 1) {
@@ -823,7 +824,7 @@ static void *do_pktccops(void *data)
while (sobjp < (pobject->contents + pobject->length - 4)) {
sobjlen = ntohs(*((uint16_t *) sobjp));
snst = ntohs(*((uint16_t *) (sobjp + 2)));
- ast_debug(3, " S-Num S-type: 0x%.4x len: %i\n", snst, sobjlen);
+ ast_debug(3, " S-Num S-type: 0x%.4x len: %i\n", (unsigned)snst, sobjlen);
if (snst == 0x0101 ) {
recvtrid = ntohs(*((uint16_t *) (sobjp + 4)));
scommand = ntohs(*((uint16_t *) (sobjp + 6)));
@@ -843,7 +844,7 @@ static void *do_pktccops(void *data)
} else if (snst == 0x0d01) {
reason = ntohs(*((uint16_t *) (sobjp + 4)));
subreason = ntohs(*((uint16_t *) (sobjp + 6)));
- ast_debug(3, " Reason: %u Subreason: %u\n", reason, subreason);
+ ast_debug(3, " Reason: %d Subreason: %d\n", reason, subreason);
}
sobjp += sobjlen;
if (!sobjlen)
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 444b9f7c5..6f2287c9b 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -766,7 +766,7 @@ static char *generate_random_string(char *buf, size_t size)
for (x=0; x<4; x++) {
val[x] = ast_random();
}
- snprintf(buf, size, "%08lx%08lx%08lx%08lx", val[0], val[1], val[2], val[3]);
+ snprintf(buf, size, "%08lx%08lx%08lx%08lx", (long unsigned)val[0], (long unsigned)val[1], (long unsigned)val[2], (long unsigned)val[3]);
return buf;
}
@@ -862,7 +862,7 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
}
for (i = 0; i < size; i++) {
- sprintf(local_fingerprint, "%.2X:", fingerprint[i]);
+ sprintf(local_fingerprint, "%.2X:", (unsigned)fingerprint[i]);
local_fingerprint += 3;
}
@@ -1483,7 +1483,7 @@ static int dtls_srtp_setup(struct ast_rtp *rtp, struct ast_srtp *srtp, struct as
}
if (res_srtp_policy->set_suite(local_policy, rtp->suite)) {
- ast_log(LOG_WARNING, "Could not set suite to '%d' on local policy of '%p' when setting up DTLS-SRTP\n", rtp->suite, rtp);
+ ast_log(LOG_WARNING, "Could not set suite to '%u' on local policy of '%p' when setting up DTLS-SRTP\n", rtp->suite, rtp);
goto error;
}
@@ -1503,7 +1503,7 @@ static int dtls_srtp_setup(struct ast_rtp *rtp, struct ast_srtp *srtp, struct as
}
if (res_srtp_policy->set_suite(remote_policy, rtp->suite)) {
- ast_log(LOG_WARNING, "Could not set suite to '%d' on remote policy of '%p' when setting up DTLS-SRTP\n", rtp->suite, rtp);
+ ast_log(LOG_WARNING, "Could not set suite to '%u' on remote policy of '%p' when setting up DTLS-SRTP\n", rtp->suite, rtp);
goto error;
}
@@ -2185,7 +2185,7 @@ static int ast_rtp_dtmf_begin(struct ast_rtp_instance *instance, char digit)
}
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6d, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
@@ -2236,7 +2236,7 @@ static int ast_rtp_dtmf_continuation(struct ast_rtp_instance *instance)
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6d, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
@@ -2285,7 +2285,7 @@ static int ast_rtp_dtmf_end_with_duration(struct ast_rtp_instance *instance, cha
rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000));
if (duration > 0 && (measured_samples = duration * rtp_get_rate(&rtp->f.subclass.format) / 1000) > rtp->send_duration) {
- ast_debug(2, "Adjusting final end duration from %u to %u\n", rtp->send_duration, measured_samples);
+ ast_debug(2, "Adjusting final end duration from %d to %u\n", rtp->send_duration, measured_samples);
rtp->send_duration = measured_samples;
}
@@ -2312,7 +2312,7 @@ static int ast_rtp_dtmf_end_with_duration(struct ast_rtp_instance *instance, cha
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Sent RTP DTMF packet to %s%s (type %-2.2d, seq %-6.6d, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
@@ -2576,7 +2576,7 @@ static int ast_rtcp_write_report(struct ast_rtp_instance *instance, int sr)
}
ast_verbose(" Report block:\n");
ast_verbose(" Their SSRC: %u\n", report_block->source_ssrc);
- ast_verbose(" Fraction lost: %u\n", report_block->lost_count.fraction);
+ ast_verbose(" Fraction lost: %d\n", report_block->lost_count.fraction);
ast_verbose(" Cumulative loss: %u\n", report_block->lost_count.packets);
ast_verbose(" Highest seq no: %u\n", report_block->highest_seq_no);
ast_verbose(" IA jitter: %.4f\n", (double)report_block->ia_jitter / rate);
@@ -2652,7 +2652,7 @@ static int ast_rtp_raw_write(struct ast_rtp_instance *instance, struct ast_frame
if (abs(rtp->lastts - pred) < MAX_TIMESTAMP_SKEW) {
rtp->lastts = pred;
} else {
- ast_debug(3, "Difference is %d, ms is %d\n", abs(rtp->lastts - pred), ms);
+ ast_debug(3, "Difference is %d, ms is %u\n", abs(rtp->lastts - pred), ms);
mark = 1;
}
}
@@ -2667,7 +2667,7 @@ static int ast_rtp_raw_write(struct ast_rtp_instance *instance, struct ast_frame
rtp->lastts = pred;
rtp->lastovidtimestamp += frame->samples;
} else {
- ast_debug(3, "Difference is %d, ms is %d (%d), pred/ts/samples %d/%d/%d\n", abs(rtp->lastts - pred), ms, ms * 90, rtp->lastts, pred, frame->samples);
+ ast_debug(3, "Difference is %d, ms is %u (%u), pred/ts/samples %u/%d/%d\n", abs(rtp->lastts - pred), ms, ms * 90, rtp->lastts, pred, frame->samples);
rtp->lastovidtimestamp = rtp->lastts;
}
}
@@ -2681,7 +2681,7 @@ static int ast_rtp_raw_write(struct ast_rtp_instance *instance, struct ast_frame
rtp->lastts = pred;
rtp->lastotexttimestamp += frame->samples;
} else {
- ast_debug(3, "Difference is %d, ms is %d, pred/ts/samples %d/%d/%d\n", abs(rtp->lastts - pred), ms, rtp->lastts, pred, frame->samples);
+ ast_debug(3, "Difference is %d, ms is %u, pred/ts/samples %u/%d/%d\n", abs(rtp->lastts - pred), ms, rtp->lastts, pred, frame->samples);
rtp->lastotexttimestamp = rtp->lastts;
}
}
@@ -2744,7 +2744,7 @@ static int ast_rtp_raw_write(struct ast_rtp_instance *instance, struct ast_frame
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent RTP packet to %s%s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Sent RTP packet to %s%s (type %-2.2d, seq %-6.6d, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
codec, rtp->seqno, rtp->lastts, res - hdrlen);
@@ -3061,7 +3061,7 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha
samples &= 0xFFFF;
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Got RTP RFC2833 from %s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u, mark %d, event %08x, end %d, duration %-5.5d) \n",
+ ast_verbose("Got RTP RFC2833 from %s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6d, mark %d, event %08x, end %d, duration %-5.5u) \n",
ast_sockaddr_stringify(&remote_address),
payloadtype, seqno, timestamp, len, (mark?1:0), event, ((event_end & 0x80)?1:0), samples);
}
@@ -3122,7 +3122,7 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha
rtp->dtmf_duration = rtp->dtmf_timeout = 0;
AST_LIST_INSERT_TAIL(frames, f, frame_list);
} else if (rtpdebug) {
- ast_debug(1, "Dropping duplicate or out of order DTMF END frame (seqno: %d, ts %d, digit %c)\n",
+ ast_debug(1, "Dropping duplicate or out of order DTMF END frame (seqno: %u, ts %u, digit %c)\n",
seqno, timestamp, resp);
}
} else {
@@ -3139,7 +3139,7 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha
* this.
*/
if (rtpdebug) {
- ast_debug(1, "Dropping out of order DTMF frame (seqno %d, ts %d, digit %c)\n",
+ ast_debug(1, "Dropping out of order DTMF frame (seqno %u, ts %u, digit %c)\n",
seqno, timestamp, resp);
}
return;
@@ -3224,7 +3224,7 @@ static struct ast_frame *process_dtmf_cisco(struct ast_rtp_instance *instance, u
event = data[3] & 0x1f;
if (rtpdebug)
- ast_debug(0, "Cisco DTMF Digit: %02x (len=%d, seq=%d, flags=%02x, power=%d, history count=%d)\n", event, len, seq, flags, power, (len - 4) / 2);
+ ast_debug(0, "Cisco DTMF Digit: %02x (len=%d, seq=%d, flags=%02x, power=%u, history count=%d)\n", event, len, seq, flags, power, (len - 4) / 2);
if (event < 10) {
resp = '0' + event;
} else if (event < 11) {
@@ -3560,8 +3560,8 @@ static struct ast_frame *ast_rtcp_read(struct ast_rtp_instance *instance)
timeval2ntp(now, &msw, &lsw);
lsr_now = (((msw & 0xffff) << 16) | ((lsw & 0xffff0000) >> 16));
ast_verbose("Internal RTCP NTP clock skew detected: "
- "lsr=%u, now=%u, dlsr=%u (%d:%03dms), "
- "diff=%d\n",
+ "lsr=%u, now=%u, dlsr=%u (%u:%03ums), "
+ "diff=%u\n",
report_block->lsr, lsr_now, report_block->dlsr, report_block->dlsr / 65536,
(report_block->dlsr % 65536) * 1000 / 65536,
report_block->dlsr - (lsr_now - report_block->lsr));
@@ -3571,7 +3571,7 @@ static struct ast_frame *ast_rtcp_read(struct ast_rtp_instance *instance)
rtp->rtcp->reported_jitter_count++;
if (rtcp_debug_test_addr(&addr)) {
- ast_verbose(" Fraction lost: %u\n", report_block->lost_count.fraction);
+ ast_verbose(" Fraction lost: %d\n", report_block->lost_count.fraction);
ast_verbose(" Packets lost so far: %u\n", report_block->lost_count.packets);
ast_verbose(" Highest sequence number: %u\n", report_block->highest_seq_no & 0x0000ffff);
ast_verbose(" Sequence number cycles: %u\n", report_block->highest_seq_no >> 16);
@@ -3705,7 +3705,7 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent RTP P2P packet to %s%s (type %-2.2d, len %-6.6u)\n",
+ ast_verbose("Sent RTP P2P packet to %s%s (type %-2.2d, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
bridged_payload, len - hdrlen);
@@ -3914,7 +3914,7 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
hdrlen += (ntohl(rtpheader[hdrlen/4]) & 0xffff) << 2;
hdrlen += 4;
if (option_debug) {
- int profile;
+ unsigned int profile;
profile = (ntohl(rtpheader[3]) & 0xffff0000) >> 16;
if (profile == 0x505a)
ast_debug(1, "Found Zfone extension in RTP stream - zrtp - not supported.\n");
@@ -3955,7 +3955,7 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
}
if (rtp_debug_test_addr(&addr)) {
- ast_verbose("Got RTP packet from %s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Got RTP packet from %s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&addr),
payloadtype, seqno, timestamp,res - hdrlen);
}
@@ -4448,7 +4448,7 @@ static int ast_rtp_sendcng(struct ast_rtp_instance *instance, int level)
update_address_with_ice_candidate(rtp, AST_RTP_ICE_COMPONENT_RTP, &remote_address);
if (rtp_debug_test_addr(&remote_address)) {
- ast_verbose("Sent Comfort Noise RTP packet to %s%s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+ ast_verbose("Sent Comfort Noise RTP packet to %s%s (type %-2.2d, seq %-6.6d, ts %-6.6u, len %-6.6d)\n",
ast_sockaddr_stringify(&remote_address),
ice ? " (via ICE)" : "",
AST_RTP_CN, rtp->seqno, rtp->lastdigitts, res - hdrlen);
diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index 608413226..426782d13 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -320,7 +320,7 @@ static void *sorcery_config_open(const char *data)
char *name = strsep(&option, "="), *value = option;
if (!strcasecmp(name, "buckets")) {
- if (sscanf(value, "%30d", &config->buckets) != 1) {
+ if (sscanf(value, "%30u", &config->buckets) != 1) {
ast_log(LOG_ERROR, "Unsupported bucket size of '%s' used for configuration file '%s', defaulting to '%d'\n",
value, filename, DEFAULT_OBJECT_BUCKETS);
}
diff --git a/res/res_srtp.c b/res/res_srtp.c
index 41241d0ed..48c69a3e5 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -270,7 +270,7 @@ static int policy_set_suite(crypto_policy_t *p, enum ast_srtp_suite suite)
return 0;
default:
- ast_log(LOG_ERROR, "Invalid crypto suite: %d\n", suite);
+ ast_log(LOG_ERROR, "Invalid crypto suite: %u\n", suite);
return -1;
}
}
@@ -495,18 +495,18 @@ static int ast_srtp_add_stream(struct ast_srtp *srtp, struct ast_srtp_policy *po
return -1;
} else {
if (srtp_remove_stream(srtp->session, match->sp.ssrc.value) != err_status_ok) {
- ast_log(AST_LOG_WARNING, "Failed to remove SRTP stream for SSRC %d\n", match->sp.ssrc.value);
+ ast_log(AST_LOG_WARNING, "Failed to remove SRTP stream for SSRC %u\n", match->sp.ssrc.value);
}
ao2_t_unlink(srtp->policies, match, "Remove existing match policy");
ao2_t_ref(match, -1, "Unreffing already existing policy");
}
}
- ast_debug(3, "Adding new policy for %s %d\n",
+ ast_debug(3, "Adding new policy for %s %u\n",
policy->sp.ssrc.type == ssrc_specific ? "SSRC" : "type",
policy->sp.ssrc.type == ssrc_specific ? policy->sp.ssrc.value : policy->sp.ssrc.type);
if (srtp_add_stream(srtp->session, &policy->sp) != err_status_ok) {
- ast_log(AST_LOG_WARNING, "Failed to add SRTP stream for %s %d\n",
+ ast_log(AST_LOG_WARNING, "Failed to add SRTP stream for %s %u\n",
policy->sp.ssrc.type == ssrc_specific ? "SSRC" : "type",
policy->sp.ssrc.type == ssrc_specific ? policy->sp.ssrc.value : policy->sp.ssrc.type);
return -1;
@@ -534,7 +534,7 @@ static int ast_srtp_change_source(struct ast_srtp *srtp, unsigned int from_ssrc,
if (ast_srtp_add_stream(srtp, match)) {
ast_log(LOG_WARNING, "Couldn't add stream\n");
} else if ((status = srtp_remove_stream(srtp->session, from_ssrc))) {
- ast_debug(3, "Couldn't remove stream (%d)\n", status);
+ ast_debug(3, "Couldn't remove stream (%u)\n", status);
}
ao2_t_ref(match, -1, "Unreffing found policy in change_source");
}
diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c
index b434dca63..67d4efc63 100644
--- a/res/res_stasis_playback.c
+++ b/res/res_stasis_playback.c
@@ -632,7 +632,7 @@ enum stasis_playback_oper_results stasis_app_playback_operation(
ast_assert(playback->state >= 0 && playback->state < STASIS_PLAYBACK_STATE_MAX);
if (operation < 0 || operation >= STASIS_PLAYBACK_MEDIA_OP_MAX) {
- ast_log(LOG_ERROR, "Invalid playback operation %d\n", operation);
+ ast_log(LOG_ERROR, "Invalid playback operation %u\n", operation);
return -1;
}
@@ -646,7 +646,7 @@ enum stasis_playback_oper_results stasis_app_playback_operation(
/* And, really, all operations should be valid during
* playback */
ast_log(LOG_ERROR,
- "Unhandled operation during playback: %d\n",
+ "Unhandled operation during playback: %u\n",
operation);
return STASIS_PLAYBACK_OPER_FAILED;
}
diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c
index a256fe999..55954cd1e 100644
--- a/res/res_stasis_recording.c
+++ b/res/res_stasis_recording.c
@@ -576,13 +576,13 @@ enum stasis_app_recording_oper_results stasis_app_recording_operation(
SCOPED_AO2LOCK(lock, recording);
if (recording->state < 0 || recording->state >= STASIS_APP_RECORDING_STATE_MAX) {
- ast_log(LOG_WARNING, "Invalid recording state %d\n",
+ ast_log(LOG_WARNING, "Invalid recording state %u\n",
recording->state);
return -1;
}
if (operation < 0 || operation >= STASIS_APP_RECORDING_OPER_MAX) {
- ast_log(LOG_WARNING, "Invalid recording operation %d\n",
+ ast_log(LOG_WARNING, "Invalid recording operation %u\n",
operation);
return -1;
}
@@ -597,7 +597,7 @@ enum stasis_app_recording_oper_results stasis_app_recording_operation(
/* And, really, all operations should be valid during
* recording */
ast_log(LOG_ERROR,
- "Unhandled operation during recording: %d\n",
+ "Unhandled operation during recording: %u\n",
operation);
return STASIS_APP_RECORDING_OPER_FAILED;
}
diff --git a/res/res_stasis_snoop.c b/res/res_stasis_snoop.c
index 169e02b75..e4a309d47 100644
--- a/res/res_stasis_snoop.c
+++ b/res/res_stasis_snoop.c
@@ -327,7 +327,7 @@ struct ast_channel *stasis_app_control_snoop(struct ast_channel *chan,
/* Allocate a Snoop channel and set up various parameters */
snoop->chan = ast_channel_alloc(1, AST_STATE_UP, "", "", "", "", "", &assignedids, NULL, 0, "Snoop/%s-%08x", ast_channel_uniqueid(chan),
- ast_atomic_fetchadd_int((int *)&chan_idx, +1));
+ (unsigned)ast_atomic_fetchadd_int((int *)&chan_idx, +1));
if (!snoop->chan) {
return NULL;
}
diff --git a/res/res_stun_monitor.c b/res/res_stun_monitor.c
index 42ba106e3..c621c014d 100644
--- a/res/res_stun_monitor.c
+++ b/res/res_stun_monitor.c
@@ -370,7 +370,7 @@ static void _stun_show_status(int fd)
{
const char *status;
-#define DATALN "%-25s %-5d %-7d %-8d %-7s %-16s %-d\n"
+#define DATALN "%-25s %-5u %-7u %-8d %-7s %-16s %-d\n"
#define HEADER "%-25s %-5s %-7s %-8s %-7s %-16s %-s\n"
/*! we only have one stun server, but start to play well with more */
diff --git a/res/res_timing_dahdi.c b/res/res_timing_dahdi.c
index 7af71f141..63c80b6fc 100644
--- a/res/res_timing_dahdi.c
+++ b/res/res_timing_dahdi.c
@@ -108,7 +108,7 @@ static int dahdi_timer_set_rate(void *data, unsigned int rate)
samples = (unsigned int) roundf((8000.0 / ((float) rate)));
if (ioctl(timer->fd, DAHDI_TIMERCONFIG, &samples)) {
- ast_log(LOG_ERROR, "Failed to configure DAHDI timing fd for %u sample timer ticks\n",
+ ast_log(LOG_ERROR, "Failed to configure DAHDI timing fd for %d sample timer ticks\n",
samples);
return -1;
}
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index fcdd2c4a8..0cfc37b4c 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -1463,7 +1463,7 @@ static int xmpp_pubsub_handle_event(void *data, ikspak *pak)
}
if (!strcasecmp(iks_name(item_content), "state")) {
if ((cachable_str = iks_find_attrib(item_content, "cachable"))) {
- sscanf(cachable_str, "%30d", &cachable);
+ sscanf(cachable_str, "%30u", &cachable);
}
device_state = iks_find_cdata(item, "state");
ast_publish_device_state_full(item_id,
@@ -3374,7 +3374,7 @@ static int xmpp_pak_presence(struct ast_xmpp_client *client, struct ast_xmpp_cli
}
manager_event(EVENT_FLAG_USER, "JabberStatus",
- "Account: %s\r\nJID: %s\r\nStatus: %d\r\n",
+ "Account: %s\r\nJID: %s\r\nStatus: %u\r\n",
client->name, pak->from->partial, pak->show ? pak->show : IKS_SHOW_UNAVAILABLE);
}