summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2020-06-07 18:05:18 +0200
committerJens Georg <mail@jensge.org>2020-06-07 18:05:35 +0200
commit4da7a32c052b42785b748624a3002210bd9b19f5 (patch)
tree4fe907a3d890b0ffeb90771f540aad96c80bcd8f
parent0a45370edd6a6c088bd49b4ba3187367b65cd2d2 (diff)
downloadgupnp-tools-4da7a32c052b42785b748624a3002210bd9b19f5.tar.gz
upload: Check for UDN
-rw-r--r--src/upload/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/upload/main.c b/src/upload/main.c
index 0b60f5a..a47cb1e 100644
--- a/src/upload/main.c
+++ b/src/upload/main.c
@@ -150,7 +150,7 @@ main (gint argc,
return -1;
}
- if (argc < 3) {
+ if (argc < 2) {
char *help = NULL;
help = g_option_context_get_help (context, TRUE, NULL);
@@ -160,6 +160,11 @@ main (gint argc,
return -4;
}
+ if (udn == NULL) {
+ g_print ("Error: Please provide UDN for the target server\n");
+ return -4;
+ }
+
/* Get the list of files to upload */
for (i = 1; i < argc; i++) {
if (!g_file_test (argv[i],