git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@619
959494ce-11ee-0310-bf91-
de5d638817bd
free(transfer->filterbuf);
if(transfer->hash != NULL)
freehash(transfer->hash);
free(transfer->filterbuf);
if(transfer->hash != NULL)
freehash(transfer->hash);
+ if(transfer->exitstatus != NULL)
+ free(transfer->exitstatus);
if(transfer->localend != NULL)
{
transfer->localend->readcb = NULL;
if(transfer->localend != NULL)
{
transfer->localend->readcb = NULL;
+static void handletranscmd(struct transfer *transfer, wchar_t *cmd, wchar_t *arg)
+{
+ if(!wcscmp(cmd, L"status")) {
+ if(arg == NULL)
+ arg = L"";
+ if(transfer->exitstatus != NULL)
+ free(transfer->exitstatus);
+ transfer->exitstatus = swcsdup(arg);
+ }
+}
+
static void filterread(struct socket *sk, struct transfer *transfer)
{
char *buf, *p, *p2;
static void filterread(struct socket *sk, struct transfer *transfer)
{
char *buf, *p, *p2;
if((arg = icmbstowcs(p2, NULL)) == NULL)
flog(LOG_WARNING, "filter sent a string which could not be converted into the local charset: %s: %s", p2, strerror(errno));
}
if((arg = icmbstowcs(p2, NULL)) == NULL)
flog(LOG_WARNING, "filter sent a string which could not be converted into the local charset: %s: %s", p2, strerror(errno));
}
+ handletranscmd(transfer, cmd, arg);
CBCHAINDOCB(transfer, trans_filterout, transfer, cmd, arg);
if(arg != NULL)
free(arg);
CBCHAINDOCB(transfer, trans_filterout, transfer, cmd, arg);
if(arg != NULL)
free(arg);