Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benedikt Wildenhain
purple-xmpp-http-upload
Commits
178096cb
Commit
178096cb
authored
Dec 31, 2017
by
Junker
Browse files
fix printf of gsize and size_t formats
parent
94bbea06
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jabber_http_file_upload.c
View file @
178096cb
...
...
@@ -82,7 +82,7 @@ static void jabber_hfu_http_send_connect_cb(gpointer data, PurpleSslConnection *
headers
=
g_strdup_printf
(
"PUT /%s HTTP/1.0
\r\n
"
"Connection: close
\r\n
"
"Host: %s
\r\n
"
"Content-Length: %
l
u
\r\n
"
"Content-Length: %
z
u
\r\n
"
"Content-Type: application/octet-stream
\r\n
"
"User-Agent: libpurple
\r\n
"
"
\r\n
"
,
...
...
@@ -207,7 +207,7 @@ static void jabber_hfu_send_request(PurpleXfer *xfer)
filename
=
purple_xfer_get_filename
(
xfer
);
filepath
=
purple_xfer_get_local_filename
(
xfer
);
filesize
=
g_strdup_printf
(
"%
l
u"
,
purple_xfer_get_size
(
xfer
));
filesize
=
g_strdup_printf
(
"%
z
u"
,
purple_xfer_get_size
(
xfer
));
filemime
=
file_get_mime
(
filepath
);
if
(
str_equal
(
js_data
->
ns
,
NS_HTTP_FILE_UPLOAD_V0
))
...
...
@@ -336,7 +336,7 @@ static void jabber_hfu_xfer_init(PurpleXfer *xfer)
if
(
js_data
->
max_file_size
&&
purple_xfer_get_size
(
xfer
)
>
js_data
->
max_file_size
)
{
gchar
*
msg
=
g_strdup_printf
(
_
(
"HTTP File Upload maximum file size is %
lu
bytes"
),
js_data
->
max_file_size
);
gchar
*
msg
=
g_strdup_printf
(
_
(
"HTTP File Upload maximum file size is %
"
G_GSIZE_FORMAT
"
bytes"
),
js_data
->
max_file_size
);
purple_notify_error
(
hfux
->
js
->
gc
,
_
(
"File Send Failed"
),
_
(
"File Send Failed"
),
msg
);
g_free
(
msg
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment