#include "amanda.h"
#include "util.h"
#include "amrecover.h"
+#include "amxml.h"
-#ifdef SAMBA_CLIENT
extern unsigned short samba_extract_method;
-#endif /* SAMBA_CLIENT */
/* sets a date, mapping given date into standard form if needed */
int
if (is_extract_list_nonempty())
{
g_printf(_("Must clear extract list before changing host\n"));
+ amfree(uqhost);
return;
}
exit(1);
amfree(cmd);
- if (!server_happy())
+ if (!server_happy()) {
+ amfree(uqmtpt);
+ amfree(uqdsk);
return;
+ }
disk_name = newstralloc(disk_name, uqdsk);
if (mtpt == NULL)
}
amfree(uqmtpt);
amfree(uqdsk);
+
+ if (am_has_feature(indexsrv_features, fe_amindexd_DLE)) {
+ char *dle_str;
+ char *errmsg = NULL;
+
+ cmd = stralloc("DLE");
+ if (exchange(cmd) == -1)
+ exit(1);
+ amfree(cmd);
+
+ if (!server_happy())
+ return;
+
+ dle_str = reply_line();
+ if (BSTRNCMP(dle_str+4, "NODLE") == 0) {
+ dump_dle = NULL;
+ } else {
+ dle_str = unquote_string(dle_str+4);
+ dump_dle = amxml_parse_node_CHAR(dle_str, &errmsg);
+ }
+ }
}
void
g_printf(_("\"%s\" is not a valid shell wildcard pattern: "), glob);
puts(s);
amfree(regex);
+ amfree(uqglob);
return;
}
/*
if ((s = validate_regexp(uqregex)) != NULL) {
g_printf(_("\"%s\" is not a valid regular expression: "), uq_orig_regex);
amfree(uqregex);
+ amfree(uq_orig_regex);
puts(s);
return;
}
if(dir[strlen(dir)-1] == '/')
dir[strlen(dir)-1] = '\0'; /* remove last / */
/* remove everything before the last / */
- dir1 = rindex(dir,'/');
+ dir1 = strrchr(dir,'/');
if (dir1) {
dir1++;
dir2 = stralloc(dir1);
set_mode(
int mode)
{
-#ifdef SAMBA_CLIENT
if (mode == SAMBA_SMBCLIENT) {
g_printf (_("SAMBA dumps will be extracted using smbclient\n"));
samba_extract_method = SAMBA_SMBCLIENT;
samba_extract_method = SAMBA_TAR;
}
}
-#else
- (void)mode; /* Quiet unused parameter warning */
-#endif /* SAMBA_CLIENT */
}
void