diff --git a/ngx_rtmp_auto_push_module.c b/ngx_rtmp_auto_push_module.c
index 4acdc0b..7c0c2b3 100644
--- a/ngx_rtmp_auto_push_module.c
+++ b/ngx_rtmp_auto_push_module.c
@@ -308,7 +308,7 @@ ngx_rtmp_auto_push_reconnect(ngx_event_t *ev)
ngx_rtmp_relay_target_t at;
u_char path[sizeof("unix:") + NGX_MAX_PATH];
u_char flash_ver[sizeof("APSH ,") +
- NGX_OFF_T_LEN * 2];
+ NGX_INT_T_LEN * 2];
u_char play_path[NGX_RTMP_MAX_NAME];
ngx_str_t name;
u_char *p;
diff --git a/ngx_rtmp_control_module.c b/ngx_rtmp_control_module.c
index 759be3a..83ca22e 100644
--- a/ngx_rtmp_control_module.c
+++ b/ngx_rtmp_control_module.c
@@ -392,7 +392,7 @@ ngx_rtmp_control_drop(ngx_http_request_t *r, ngx_str_t *method)
/* output ndropped */
- len = NGX_OFF_T_LEN;
+ len = NGX_INT_T_LEN;
p = ngx_palloc(r->connection->pool, len);
if (p == NULL) {
diff --git a/ngx_rtmp_log_module.c b/ngx_rtmp_log_module.c
index 0faf793..fa9cc3e 100644
--- a/ngx_rtmp_log_module.c
+++ b/ngx_rtmp_log_module.c
@@ -158,16 +158,16 @@ ngx_rtmp_log_var_default_getdata(ngx_rtmp_session_t *s, u_char *buf,
static size_t
-ngx_rtmp_log_var_number_getlen(ngx_rtmp_session_t *s, ngx_rtmp_log_op_t *op)
+ngx_rtmp_log_var_connection_getlen(ngx_rtmp_session_t *s, ngx_rtmp_log_op_t *op)
{
- return NGX_OFF_T_LEN;
+ return NGX_INT_T_LEN;
}
static u_char *
ngx_rtmp_log_var_connection_getdata(ngx_rtmp_session_t *s, u_char *buf,
ngx_rtmp_log_op_t *op)
{
- return ngx_sprintf(buf, "%O", (off_t) s->connection->number);
+ return ngx_sprintf(buf, "%ui", (ngx_uint_t) s->connection->number);
}
@@ -192,7 +192,7 @@ static size_t
ngx_rtmp_log_var_session_string_getlen(ngx_rtmp_session_t *s,
ngx_rtmp_log_op_t *op)
{
- return ((ngx_str_t *) ((uint8_t *) s + op->offset))->len;
+ return ((ngx_str_t *) ((u_char *) s + op->offset))->len;
}
@@ -202,7 +202,7 @@ ngx_rtmp_log_var_session_string_getdata(ngx_rtmp_session_t *s, u_char *buf,
{
ngx_str_t *str;
- str = (ngx_str_t *) ((uint8_t *) s + op->offset);
+ str = (ngx_str_t *) ((u_char *) s + op->offset);
return ngx_cpymem(buf, str->data, str->len);
}
@@ -303,7 +303,7 @@ ngx_rtmp_log_var_time_local_getdata(ngx_rtmp_session_t *s, u_char *buf,
ngx_rtmp_log_op_t *op)
{
return ngx_cpymem(buf, ngx_cached_http_log_time.data,
- ngx_cached_http_log_time.len);
+ ngx_cached_http_log_time.len);
}
@@ -328,7 +328,7 @@ static size_t
ngx_rtmp_log_var_session_readable_time_getlen(ngx_rtmp_session_t *s,
ngx_rtmp_log_op_t *op)
{
- return NGX_OFF_T_LEN + sizeof("d 23h 59m 59s") - 1;
+ return NGX_INT_T_LEN + sizeof("d 23h 59m 59s") - 1;
}
@@ -366,7 +366,7 @@ ngx_rtmp_log_var_session_readable_time_getdata(ngx_rtmp_session_t *s,
static ngx_rtmp_log_var_t ngx_rtmp_log_vars[] = {
{ ngx_string("connection"),
- ngx_rtmp_log_var_number_getlen,
+ ngx_rtmp_log_var_connection_getlen,
ngx_rtmp_log_var_connection_getdata,
0 },
diff --git a/ngx_rtmp_netcall_module.c b/ngx_rtmp_netcall_module.c
index 230b3b1..a3880dc 100644
--- a/ngx_rtmp_netcall_module.c
+++ b/ngx_rtmp_netcall_module.c
@@ -547,7 +547,7 @@ ngx_rtmp_netcall_http_format_request(ngx_int_t method, ngx_str_t *host,
}
b = ngx_create_temp_buf(pool, sizeof(rq_tmpl) + host->len +
- content_type->len + NGX_OFF_T_LEN);
+ content_type->len + NGX_SIZE_T_LEN);
if (b == NULL) {
return NULL;
}
@@ -685,12 +685,9 @@ ngx_rtmp_netcall_memcache_set(ngx_rtmp_session_t *s, ngx_pool_t *pool,
return NULL;
}
- b = ngx_create_temp_buf(pool,
- sizeof("set ") - 1 + key->len +
- (sizeof(" ") - 1 + NGX_OFF_T_LEN) * 3 +
- (sizeof("\r\n") - 1) * 2
- + value->len
- );
+ b = ngx_create_temp_buf(pool, sizeof("set ") - 1 + key->len +
+ (1 + NGX_INT_T_LEN) * 3 +
+ (sizeof("\r\n") - 1) * 2 + value->len);
if (b == NULL) {
return NULL;
@@ -699,9 +696,8 @@ ngx_rtmp_netcall_memcache_set(ngx_rtmp_session_t *s, ngx_pool_t *pool,
cl->next = NULL;
cl->buf = b;
- b->last = ngx_sprintf(b->pos,
- "set %V %ui %ui %ui\r\n%V\r\n",
- key, flags, sec, (ngx_uint_t)value->len, value);
+ b->last = ngx_sprintf(b->pos, "set %V %ui %ui %ui\r\n%V\r\n",
+ key, flags, sec, (ngx_uint_t) value->len, value);
return cl;
}
diff --git a/ngx_rtmp_notify_module.c b/ngx_rtmp_notify_module.c
index 85e9185..ee3f37a 100644
--- a/ngx_rtmp_notify_module.c
+++ b/ngx_rtmp_notify_module.c
@@ -583,7 +583,7 @@ ngx_rtmp_notify_play_create(ngx_rtmp_session_t *s, void *arg,
sizeof("&call=play") +
sizeof("&name=") + name_len * 3 +
sizeof("&start=&duration=&reset=") +
- NGX_OFF_T_LEN * 3 + 1 + args_len);
+ NGX_INT32_LEN * 3 + 1 + args_len);
if (b == NULL) {
return NULL;
}
diff --git a/ngx_rtmp_stat_module.c b/ngx_rtmp_stat_module.c
index db1a846..1e37c91 100644
--- a/ngx_rtmp_stat_module.c
+++ b/ngx_rtmp_stat_module.c
@@ -276,7 +276,7 @@ ngx_rtmp_stat_bw(ngx_http_request_t *r, ngx_chain_t ***lll,
#ifdef NGX_RTMP_POOL_DEBUG
static void
ngx_rtmp_stat_get_pool_size(ngx_pool_t *pool, ngx_uint_t *nlarge,
- size_t *size)
+ ngx_uint_t *size)
{
ngx_pool_large_t *l;
ngx_pool_t *p, *n;
@@ -300,19 +300,16 @@ static void
ngx_rtmp_stat_dump_pool(ngx_http_request_t *r, ngx_chain_t ***lll,
ngx_pool_t *pool)
{
- ngx_uint_t nlarge;
- size_t size;
- u_char buf[NGX_OFF_T_LEN + 1];
+ ngx_uint_t nlarge, size;
+ u_char buf[NGX_INT_T_LEN];
size = 0;
nlarge = 0;
ngx_rtmp_stat_get_pool_size(pool, &nlarge, &size);
NGX_RTMP_STAT_L("