aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli/qmicli-wds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmicli/qmicli-wds.c')
-rw-r--r--src/qmicli/qmicli-wds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qmicli/qmicli-wds.c b/src/qmicli/qmicli-wds.c
index 5e90b4a..9ea6e1b 100644
--- a/src/qmicli/qmicli-wds.c
+++ b/src/qmicli/qmicli-wds.c
@@ -1282,16 +1282,18 @@ qmicli_wds_run (QmiDevice *device,
if (stop_network_str) {
gulong packet_data_handle;
- packet_data_handle = strtoul (stop_network_str, NULL, 10);
- if (!packet_data_handle ||
- packet_data_handle > G_MAXUINT32) {
+ if (g_str_has_prefix (stop_network_str, "0x"))
+ packet_data_handle = strtoul (stop_network_str, NULL, 16);
+ else
+ packet_data_handle = strtoul (stop_network_str, NULL, 10);
+ if (!packet_data_handle || packet_data_handle > G_MAXUINT32) {
g_printerr ("error: invalid packet data handle given '%s'\n",
stop_network_str);
operation_shutdown (FALSE);
return;
}
- g_debug ("Asynchronously stopping network...");
+ g_debug ("Asynchronously stopping network (%lu)...", packet_data_handle);
internal_stop_network (ctx->cancellable, (guint32)packet_data_handle);
return;
}