423 |
send (int argc, char **argv) |
send (int argc, char **argv) |
424 |
{ |
{ |
425 |
int i, rc; |
int i, rc; |
426 |
|
|
427 |
|
/* Verify all arguments */ |
428 |
for (i = 0; i < argc; i++) |
for (i = 0; i < argc; i++) |
429 |
if (check_file (argv[i])) |
if (check_file (argv[i])) |
430 |
return 1; |
return 1; |
431 |
|
|
432 |
|
/* Process the mtstailor file and detach from the console if |
433 |
|
required */ |
434 |
read_mts_profile (); |
read_mts_profile (); |
435 |
|
|
436 |
if (background && daemon (0, 0) < 0) |
if (background && daemon (0, 0) < 0) |
439 |
return 1; |
return 1; |
440 |
} |
} |
441 |
|
|
442 |
|
/* Prepend url specifier to the folder dir. We won't need this |
443 |
|
when the default format becomes configurable */ |
444 |
|
asprintf (&mu_path_folder_dir, "mh:%s", mu_path_folder_dir); |
445 |
|
|
446 |
|
/* Finally, do the work */ |
447 |
rc = list_do (mesg_list, _action_send, NULL); |
rc = list_do (mesg_list, _action_send, NULL); |
448 |
return rc; |
return rc; |
449 |
} |
} |